making use of --dynamic-list-cpp-typeinfo

Lubos Lunak l.lunak at suse.cz
Thu Sep 21 15:18:28 CEST 2006


On Tuesday 19 September 2006 23:53, Dirk Mueller wrote:
> On Tuesday, 19. September 2006 19:10, Lubos Lunak wrote:
> >  Is there some usable documentation on what exactly this does? I don't
> > quite see what symbols are affected from the posts on the binutils
> > mailing list I could find.
>
> It affects all function symbol relocations. on x86, this is usually
> R_386_32 or R_386_JUMP_SLOT. What it does is that whenever e.g. the code in
> libqt3 calls QString::length(), it doesn't do so via the normal symbol
> based ELF lookup semantics (which would possibly allow to override a symbol
> via LD_PRELOAD or similiar), but binds all internal references directly.
> This means that it converts symbol based relocations (which are slow due to
> the hash table and the final string collision check) into plain relative
> relocations (which are pretty fast as they're just a memory add). Plain
> relative relocations are also easy to get rid of via prelink or other
> methods. In my test however there were not only much less symbol based
> relocations, there were also less relocations overall. I'm not sure why
> that is the case, but apparently the linker can get rid of some relocations
> completely. I'm not sure which.

 Then I'd second Maksim's request for an easy way to turn it off. This looks 
like asking for getting weird bugs.

> The only thing that stops working is when we intercept a symbol in e.g.
> libqt, but I haven't hit that in my test installation. I didn't build all
> of KDE with it yet though.

 I've used that a couple of times, e.g. the hack in the #0048 qt-copy patch. I 
think Michael Meeks has some tool for detecting interposing for his -Bdirect 
patches, -Bdirect should have the same problem.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz


More information about the Kde-optimize mailing list