tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] i386 PIC PLT optimization ?


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] i386 PIC PLT optimization ?
Date: Thu, 16 Jan 2003 11:14:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020828

Greg Haerr wrote:
1) On i386, the PLT is built by the static linker whereas on PPC it is built dynamically by the dynamic linker. The net result is that the executables are smaller and that indirect jumps can be avoided in the PLT, so the inter DLL/EXEs calls are faster.


Does this require paging in the entire executable for the scan, or is it handled differently? In other words, is this method likely
to be quite a bit slower for larger executables?

It requires that the PLT is built at dll load time, but the symbols can be resolved lazily as it is done now. I think the slow down will be negligible : I expect a PLT with only 8 byte/entry (instead of 16 bytes currently) and the PLT creation is mostly a memset, so it is limited by the memory bandwidth. To give you an idea, the PLT of the glibc 2.1 would have a size of 3.5 Kbytes.

Maybe implementing that in TCC could be interesting :-) A slight patch in ld.so would be needed to support that while staying compatible with standard DLLs.


Sounds interesting, I must say.  I like the notion of later-stage dynamic
linking.  Does this method require the symbol table, which would allow
late-time binding by function name, or is the method using compile-time
addresses?

Yes, it allows all that is done currently in ld.so. It is just an optimization.

Fabrice.





reply via email to

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