summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2017-10-10 10:09:35 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2017-10-10 10:09:35 +0000
commitb5ca92ef7385e39c9bf3b5eaf8c76343397b54e4 (patch)
treeec3bbc2b6e89322837e2f57ed0d17f7b279f1eb8 /llvm/lib/Transforms/Scalar
parent4d54a4b4f7859add152942ab37af6de189875a3f (diff)
downloadbcm5719-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
OpenPOWER on IntegriCloud