diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-24 20:37:01 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-11-24 20:37:01 +0000 |
commit | 990914d64c22c8465f01b69473f11004def124ce (patch) | |
tree | df3674c505544a42646f3aea4f544e54fea7d80c /llvm/lib/ExecutionEngine/RuntimeDyld | |
parent | 1b4fecb098a5407734128d628733d1fbd86e054d (diff) | |
download | bcm5719-llvm-990914d64c22c8465f01b69473f11004def124ce.tar.gz bcm5719-llvm-990914d64c22c8465f01b69473f11004def124ce.zip |
[RuntimeDyld] Fix a class of arithmetic errors introduced in r253918
r253918 had refactored expressions like "A - B.Address + C" to "A -
B.getAddressWithOffset(C)". This is incorrect, since the latter really
computes "A - B.Address - C".
None of the tests I can run locally on x86 broke due to this bug, but it
is the current suspect for breakage on the AArch64 buildbots.
llvm-svn: 254017
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 6f8cb1086f6..e09b71af18a 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -1259,13 +1259,13 @@ relocation_iterator RuntimeDyldELF::processRelocationRef( StubTargetAddr - Section.getAddress(), ELF::R_AARCH64_MOVW_UABS_G3, Value.Addend); RelocationEntry REmovk_g2(SectionID, StubTargetAddr - - Section.getAddressWithOffset(4), + Section.getAddress() + 4, ELF::R_AARCH64_MOVW_UABS_G2_NC, Value.Addend); RelocationEntry REmovk_g1(SectionID, StubTargetAddr - - Section.getAddressWithOffset(8), + Section.getAddress() + 8, ELF::R_AARCH64_MOVW_UABS_G1_NC, Value.Addend); RelocationEntry REmovk_g0(SectionID, StubTargetAddr - - Section.getAddressWithOffset(12), + Section.getAddress() + 12, ELF::R_AARCH64_MOVW_UABS_G0_NC, Value.Addend); if (Value.SymbolName) { @@ -1364,7 +1364,7 @@ relocation_iterator RuntimeDyldELF::processRelocationRef( RelocationEntry REHi(SectionID, StubTargetAddr - Section.getAddress(), ELF::R_MIPS_HI16, Value.Addend); RelocationEntry RELo(SectionID, - StubTargetAddr - Section.getAddressWithOffset(4), + StubTargetAddr - Section.getAddress() + 4, ELF::R_MIPS_LO16, Value.Addend); if (Value.SymbolName) { |