[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: |
Christof |
Subject: |
Re: [Tinycc-devel] Tdm-gcc (mingw) 4.8.1 win64 x86_64 |
Date: |
Wed, 7 May 2014 18:16:09 +0200 |
Tried patch of grischka:
>tcc examples/fib.c
outputs fib.exe, however
>fib.exe
says "Invalid win32 program" + "access denied"
There is still something wrong with the generated pe-image.
For the moment I'll give up and stick to X86.
Grischka: Thank's for trying to help.
Christof
> Am 07.05.2014 um 00:09 schrieb grischka <address@hidden>:
>
> 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,
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel