[PATCH] D30163: [ELF] - Postpone evaluation of LMA offset.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 05:52:09 PST 2017


grimar created this revision.

Previously we evaluated the values of LMA incorrectly for next cases:

  .text : AT(ADDR(.text) - 0xffffffff80000000) { ... }
  .data : AT(ADDR(.data) - 0xffffffff80000000) { .. }
  .init.begin : AT(ADDR(.init.begin) - 0xffffffff80000000) { ... }

Reason was that we evaluated offset when VA was not assigned. For case above
we ended up with 3 loads that has similar LMA and it was incorrect.
That is critical for linux kernel.

Patch updates the offset after VA calculation. That fixes the issue I observing.


https://reviews.llvm.org/D30163

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  test/ELF/linkerscript/at-addr.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30163.89108.patch
Type: text/x-patch
Size: 4460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170220/636b7832/attachment.bin>


More information about the llvm-commits mailing list