tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] status of x86-64


From: grischka
Subject: Re: [Tinycc-devel] status of x86-64
Date: Fri, 17 Apr 2009 04:28:07 +0200
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

shinichiro.h wrote:
Hi,

I like this idea. But unfortunately, this needs some fixes for
x86-64. On x86-64, relocation may fail when the distance between
caller and callee is larger than 32bit. In such case, x86-64 TCC
generates PLT and GOT during relocation and it requires extra memory.
Anyway, I'll fix this.

Hm, does that mean we support programs larger than 2GB? 4GB?

I've just checked this fix in. This fix includes the fix for order of
relocate_syms and return offset. Please revert this change if I'm
missing something.

As to relocate_syms runned twice, it is just meant to check symbols
already in the 1st pass, so the user doesn't have to check the
return value of tcc_relocate twice.  That's the only reason.

As to "runtime_plt_and_got", well, I don't know much about PLT/GOT
but it looks like tccpe.c:1129 is doing something similar.  Basically
it makes an indirect "jmp" and puts a reloc entry on the address
such that it gets fixed later during normal relocate_section.

It means that the jmp table need to be build BEFORE relocation,
however isn't that what build_got_entries() is doing already, anyway?
Couldn't it be used to add the needed entries for TCC_OUTPUT_MEMORY,
too?  (Maybe I'm just naive)

--- grischka





reply via email to

[Prev in Thread] Current Thread [Next in Thread]