Change how we compute offsets with linker scripts.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 16 Sep 2016 15:10:23 +0000 (15:10 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 16 Sep 2016 15:10:23 +0000 (15:10 +0000)
commitd31907957a6cfcd500a620a241ffecc1b98eec5a
tree9d67a2141a7159f4f840ee850fb00b523fe8681d
parent74db8faa71f352bf94bbb2ae4ed4e4acfc6183ca
Change how we compute offsets with linker scripts.

This fixes pr30367, but more importantly, it changes how we compute offsets.

Now offset computation in a walk over linker script commands, like the
rest of assignAddresses. IMHO this is simpler to understand and if we
ever have to create multiple outputsections or chunks to change how we
handle test/ELF/linkerscript/alternate-sections.s it should be easier
to do it.

llvm-svn: 281736
lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h
lld/test/ELF/linkerscript/merge-sections.s
lld/test/ELF/linkerscript/symbols-synthetic.s