[PATCH] D31888: [LLD][ELF] Always use Script::assignAddresses()

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:07:48 PDT 2017


peter.smith created this revision.

This change fabricates linker script commands for the case where there is no linker script SECTIONS to control address assignment. This permits us to have a single Script->assignAddresses() function.

      

There is a small change in user-visible-behavior with respect to the handling of .tbss SHT_NOBITS, SHF_TLS as the Script->assignAddresses() requires setDot() to be called with monotically increasing addresses. The tls-offset.s test has been updated so that the script and non-script results match. ld.bfd and ld.gold behave similarly to lld with a linker script in that dot is always monotonically increasing.


https://reviews.llvm.org/D31888

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h
  ELF/Writer.cpp
  test/ELF/tls-offset.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31888.94673.patch
Type: text/x-patch
Size: 6218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170410/35af826e/attachment.bin>


More information about the llvm-commits mailing list