diff options
author | James Henderson <jh7370@my.bristol.ac.uk> | 2017-10-10 10:09:35 +0000 |
---|---|---|
committer | James Henderson <jh7370@my.bristol.ac.uk> | 2017-10-10 10:09:35 +0000 |
commit | b5ca92ef7385e39c9bf3b5eaf8c76343397b54e4 (patch) | |
tree | ec3bbc2b6e89322837e2f57ed0d17f7b279f1eb8 /llvm/lib/Transforms/Scalar | |
parent | 4d54a4b4f7859add152942ab37af6de189875a3f (diff) | |
download | bcm5719-llvm-b5ca92ef7385e39c9bf3b5eaf8c76343397b54e4.tar.gz bcm5719-llvm-b5ca92ef7385e39c9bf3b5eaf8c76343397b54e4.zip |
[ELF] Set Dot initially to --image-base value when using linker scripts
When parsing linker scripts, LLD previously started with a '.' value of 0,
regardless of the internal default image base for the target, and regardless of
switches such as --image-base. It seems reasonable to use a different image base
value when using linker scripts and --image-base is specified, since otherwise the
switch has no effect. This change does this, as well as removing unnecessary
initialisation of Dot where it is not used.
The default image base should not be used when processing linker
scripts, because this will change the behaviour for existing linker script users,
and potentially result in invalid output being produced, as a subsequent assignment
to Dot could move the location counter backwards. Instead, we maintain the existing
behaviour of starting from 0 if --image-base is not specified.
Reviewers: ruiu
Differential Revision: https://reviews.llvm.org/D38360
llvm-svn: 315293
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
0 files changed, 0 insertions, 0 deletions