From 4bf13779d75176b6fba0c37fe3b614842bffa193 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 27 Feb 2026 18:31:39 -0800 Subject: [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. --- arch/armv7/arch_armv7.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/armv7/arch_armv7.cpp') 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; -- cgit v1.3.1