|
From: | Michael Matz |
Subject: | Re: [Tinycc-devel] x86_64: shared libs |
Date: | Fri, 4 Apr 2014 21:09:58 +0200 (CEST) |
User-agent: | Alpine 2.00 (LNX 1167 2008-08-23) |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |