From 3d364e4dea0a6247e6076fe46699fc441e24c7b3 Mon Sep 17 00:00:00 2001 From: Cr0a3 Date: Sat, 26 Oct 2024 17:42:02 +0200 Subject: [PATCH] [FIX] fixing obj addends --- src/Obj/wrapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Obj/wrapper.rs b/src/Obj/wrapper.rs index 030c648b..f66fbb69 100644 --- a/src/Obj/wrapper.rs +++ b/src/Obj/wrapper.rs @@ -349,7 +349,7 @@ impl ObjectBuilder { let (_, _, to_sym, decl, _, _) = syms.get(&link.to).expect("expected valid link destination"); let addend = match decl { - Decl::Function => 4, + Decl::Function => if self.triple.getCallConv()? == Target::CallConv::SystemV { 4 } else {0}, _ => 0, }; let offset = -3;