Hi,

On Fri, 4 Apr 2014, grischka wrote:

Question apropos:

On linux x86_64 there is still the ugly
   "runtime_plt_and_got"
hack which is a replacement for PLT in the "tcc -run" case
to forward 32bit calls to extern libraries.

On win64 the same problem is solved by building the IAT
(import address table) also in the -run case.

From your estimation, would it be possible to do the same on ELF?
That is build the PLT/GOT as if we were making an executable and
then use that with tcc -run?

Yes, that's something on my TODO. Theoretically having runtime_plt_and_got makes code emission a tiny bit faster because having a proper PLT and GOT also for -run means first creating and second applying intermediate relocations (the _GLOB_DAT and _JUMP_SLOT relocs), which is cut short with the hack. OTOH removing the hack would remove deviation depending on output type, so I think it's a good idea nevertheless.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to