[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Tdm-gcc (mingw) 4.8.1 win64 x86_64
From: |
grischka |
Subject: |
Re: [Tinycc-devel] Tdm-gcc (mingw) 4.8.1 win64 x86_64 |
Date: |
Wed, 07 May 2014 00:09:05 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
Christof wrote:
tcc examples/fib.c
crashes w/o any message.
Seems that linker or linking is broken.
I see that too (with a tcc win64 cross compiler on win32).
You could try the patch below (and if it works, push on mob also).
If there are still problems with the resulting binary then someone
else would have to step in because I don't have a win64 installed
currently.
Thanks,
--- grischka
diff --git a/x86_64-gen.c b/x86_64-gen.c
index ae65328..22783cd 100644
--- a/x86_64-gen.c
+++ b/x86_64-gen.c
@@ -604,7 +604,11 @@ static void gcall_or_jmp(int is_jmp)
if (vtop->r & VT_SYM) {
/* relocation case */
greloc(cur_text_section, vtop->sym,
+#ifdef TCC_TARGET_PE
+ ind + 1, R_X86_64_PC32);
+#else
ind + 1, R_X86_64_PLT32);
+#endif
} else {
/* put an empty PC32 relocation */
put_elf_reloc(symtab_section, cur_text_section,