HomePhabricator

[ELF] Always use Script::assignAddresses()

Description

[ELF] Always use Script::assignAddresses()

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.

This change should make the non-script behavior of lld closer to an
equivalent linker script.

Differential Revision: https://reviews.llvm.org/D31888

Details

Committed
psmithApr 19 2017, 5:46 AM
Differential Revision
D31888: [LLD][ELF] Always use Script::assignAddresses()
Branches
Unknown
Tags
Unknown