aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x86_64-gen.c2
-rw-r--r--x86_64-link.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c
index ea06708..6102be7 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -242,7 +242,7 @@ ST_FUNC int oad(int c, int s)
ST_FUNC void gen_addr32(int r, Sym *sym, int c)
{
if (r & VT_SYM)
- greloca(cur_text_section, sym, ind, R_X86_64_32, c), c=0;
+ greloca(cur_text_section, sym, ind, R_X86_64_32S, c), c=0;
gen_le32(c);
}
diff --git a/x86_64-link.c b/x86_64-link.c
index 9ff234b..602a8ef 100644
--- a/x86_64-link.c
+++ b/x86_64-link.c
@@ -3,7 +3,7 @@
#define EM_TCC_TARGET EM_X86_64
/* relocation type for 32 bit data relocation */
-#define R_DATA_32 R_X86_64_32
+#define R_DATA_32 R_X86_64_32S
#define R_DATA_PTR R_X86_64_64
#define R_JMP_SLOT R_X86_64_JUMP_SLOT
#define R_GLOB_DAT R_X86_64_GLOB_DAT