diff options
Diffstat (limited to 'lib/Target/ARM/ARMRelocator.cpp')
-rw-r--r-- | lib/Target/ARM/ARMRelocator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMRelocator.cpp b/lib/Target/ARM/ARMRelocator.cpp index fd845cf..0e0a5ce 100644 --- a/lib/Target/ARM/ARMRelocator.cpp +++ b/lib/Target/ARM/ARMRelocator.cpp @@ -946,7 +946,8 @@ ARMRelocator::Result thm_jump19(Relocation& pReloc, ARMRelocator& pParent) { Relocator::DWord T = getThumbBit(pReloc); Relocator::DWord A = - helper_thumb32_cond_branch_offset(upper_inst, lower_inst); + helper_thumb32_cond_branch_offset(upper_inst, lower_inst) + + pReloc.addend(); Relocator::Address P = pReloc.place(); Relocator::Address S; // if symbol has plt @@ -1052,7 +1053,8 @@ ARMRelocator::Result thm_call(Relocation& pReloc, ARMRelocator& pParent) { uint16_t lower_inst = *(reinterpret_cast<uint16_t*>(&pReloc.target()) + 1); Relocator::DWord T = getThumbBit(pReloc); - Relocator::DWord A = helper_thumb32_branch_offset(upper_inst, lower_inst); + Relocator::DWord A = + helper_thumb32_branch_offset(upper_inst, lower_inst) + pReloc.addend(); Relocator::Address P = pReloc.place(); Relocator::Address S; |