summaryrefslogtreecommitdiff
path: root/arch/armv7
diff options
context:
space:
mode:
authorMark Rowe <mark@vector35.com>2026-02-27 18:31:39 -0800
committerMark Rowe <mark@vector35.com>2026-02-27 19:17:53 -0800
commit4bf13779d75176b6fba0c37fe3b614842bffa193 (patch)
treed04ef5e7df8e143bab9125ea1d959842ccdd0676 /arch/armv7
parent2b1fc96ebb746ee95c12b5a35cd4ffbe9a83d73e (diff)
[MachO] Fix relocations from chained fixups not respecting addends
The addends were correctly stored in the relocation info and displayed as offsets in linear view, but the relocation handlers never applied them. Reading from an address containing such a relocation would give an incorrect value.
Diffstat (limited to 'arch/armv7')
-rw-r--r--arch/armv7/arch_armv7.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/armv7/arch_armv7.cpp b/arch/armv7/arch_armv7.cpp
index fdd1bad7..f9fc250e 100644
--- a/arch/armv7/arch_armv7.cpp
+++ b/arch/armv7/arch_armv7.cpp
@@ -2684,8 +2684,8 @@ public:
{
auto info = reloc->GetInfo();
if (info.nativeType == BINARYNINJA_MANUAL_RELOCATION)
- { // Magic number defined in MachOView.cpp for tagged pointers
- *(uint32_t*)dest = (uint32_t)info.target;
+ { // Magic number defined in MachOView.cpp for chained fixups
+ *(uint32_t*)dest = (uint32_t)(info.target + info.addend);
}
return true;