summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-07-11 21:07:10 +0000
committerMartin Storsjo <martin@martin.st>2017-07-11 21:07:10 +0000
commit0e83e85f6322c3be7eebabd3411b37e998a26f7e (patch)
tree1f23885183410806de7d0aeb9c0ea745e160a0a4 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent95c003b96f12eab0d1d60aa7240e8a7da489ad85 (diff)
downloadbcm5719-llvm-0e83e85f6322c3be7eebabd3411b37e998a26f7e.tar.gz
bcm5719-llvm-0e83e85f6322c3be7eebabd3411b37e998a26f7e.zip
[ARM, ELF] Don't shift movt relocation offsets
For ELF, a movw+movt pair is handled as two separate relocations. If an offset should be applied to the symbol address, this offset is stored as an immediate in the instruction (as opposed to stored as an offset in the relocation itself). Even though the actual value stored in the movt immediate after linking is the top half of the value, we need to store the unshifted offset prior to linking. When the relocation is made during linking, the offset gets added to the target symbol value, and the upper half of the value is stored in the instruction. This makes sure that movw+movt with offset symbols get properly handled, in case the offset addition in the lower half should be carried over to the upper half. This makes the output from the additions to the test case match the output from GNU binutils. For COFF and MachO, the movw/movt relocations are handled as a pair, and the overflow from the lower half gets carried over to the movt, so they should keep the shifted offset just as before. Differential Revision: https://reviews.llvm.org/D35242 llvm-svn: 307713
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud