[PATCH] D50494: [LLD] Reserve memory in implicitly set LMARegions

Konstantin Schwarz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 10 06:39:18 PDT 2018


kschwarz updated this revision to Diff 160098.
kschwarz added a comment.

The search for a suitable LMARegion is now extracted into its own function. I updated this logic to the most recent bfd spec, now also taking into account different memory types.

There was also a problem in the previous version of the patch: finding the LMARegion which contains the explicitly set LMA address is not enough, we need to update the current head of the LMARegion to get valid load addresses (done in `findAndAdvanceRegion`).
If an explicit LMA address is used to move the location counter of a memory region backwards, this might lead to virtual/load address overlaps detected later in `checkSections`.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D50494

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  test/ELF/linkerscript/at10.test
  test/ELF/linkerscript/at9.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50494.160098.patch
Type: text/x-patch
Size: 7470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180810/1f9037a3/attachment.bin>


More information about the llvm-commits mailing list