[PATCH] D50052: [LLD] Improve handling of AT> linker script commands
Konstantin Schwarz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 31 04:24:56 PDT 2018
kschwarz created this revision.
kschwarz added reviewers: ruiu, grimar.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
The condition to create a new phdr must also check the usage of "AT>" linker script command, and create a new PT_LOAD header if a new LMARegion is used (test case at6.test)
If more than a single output section is added to a PT_LOAD header, only the first section should set the LMAOffset of the segment. Otherwise, we get a load-address overlap error (test case at7.test)
Moreover, if both the MemRegion and LMARegion are set, we should only increase the LMARegion if it is different from the MemRegion. Otherwise, we reserve the memory twice (test case at8.test)
This fixes PR38307
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50052
Files:
ELF/LinkerScript.cpp
ELF/Writer.cpp
test/ELF/linkerscript/Inputs/at6.s
test/ELF/linkerscript/Inputs/at7.s
test/ELF/linkerscript/Inputs/at8.s
test/ELF/linkerscript/at6.test
test/ELF/linkerscript/at7.test
test/ELF/linkerscript/at8.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50052.158215.patch
Type: text/x-patch
Size: 5825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180731/42044188/attachment.bin>
More information about the llvm-commits
mailing list