From 2fd655850aa3dcaa95893ed7fe07113f22228c04 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Thu, 31 Oct 2024 17:24:49 -0600 Subject: [PATCH] Ignore Absolute relocations and log warning --- objdiff-core/src/obj/read.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/objdiff-core/src/obj/read.rs b/objdiff-core/src/obj/read.rs index 3406085..668bddd 100644 --- a/objdiff-core/src/obj/read.rs +++ b/objdiff-core/src/obj/read.rs @@ -335,6 +335,10 @@ fn relocations_by_section( }; symbol } + RelocationTarget::Absolute => { + log::warn!("Ignoring absolute relocation @ {}:{:#x}", section.name, address); + continue; + } _ => bail!("Unhandled relocation target: {:?}", reloc.target()), }; let flags = reloc.flags(); // TODO validate reloc here?