From b25a2b9fadddd07cdd85d69264d7be9de16b2537 Mon Sep 17 00:00:00 2001 From: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> Date: Fri, 8 Mar 2024 20:33:57 +0200 Subject: Fix X86_64_RELOC_UNSIGNED not handling external symbols Signed-off-by: Visual Ehrmanntraut <30368284+VisualEhrmanntraut@users.noreply.github.com> --- arch/x86/arch_x86.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/x86/arch_x86.cpp b/arch/x86/arch_x86.cpp index e19fbef0..94cf31d5 100644 --- a/arch/x86/arch_x86.cpp +++ b/arch/x86/arch_x86.cpp @@ -4187,14 +4187,11 @@ public: dest32[0] = dest32[0] + target - (uint32_t)pcRelAddr; break; case X86_64_RELOC_UNSIGNED: - if (!info.external) + switch (info.size) { - switch (info.size) - { - case 4: *dest32 += target - (uint32_t)pcRelAddr; break; - case 8: *dest64 += info.target - pcRelAddr; break; - default: break; - } + case 4: *dest32 += target - (uint32_t)pcRelAddr; break; + case 8: *dest64 += info.target - pcRelAddr; break; + default: break; } // TODO rebasing break; -- cgit v1.3.1