[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: exporting symbols (was Re: The goodness of goodness)
From:       Michael Matz <matz () kde ! org>
Date:       2001-05-31 11:26:08
[Download RAW message or body]

Hi,

On Tue, 29 May 2001, Waldo Bastian wrote:
> > Nope.  E.g. in this example class:
> > class A {public:  A();
> > private: void m();
> > };
> > A::A() { m(); m(); }
> >
> > Here the two calls to m() result in two R_386_PC32 rels which are
> > symbol-based, whereas if A::m() would be non-visible, that could be
> > converted to _one_ R_386_RELATIVE which is constant-based.  This is also
> > what -Bsymbolic is basically doing, but I just noticed a bug in that,
> > dealing with static class members returned by inline functions.  If that
> > would be fixed we could get to these numbers:
>
> Euhm.. why does my "objdump -R <qt_or_kde_lib>" not show any R_386_PC32 reloc
> at all? Could it be that R_386_PC32 rels are only generated for non-PIC code?

Bah.  Of course, with -fPIC they indeed are R_386_JUMP_SLOT's.

> > The numbers are symbol-based relocations (lazy and non-lazy)
> > (objdump -R .so | grep -v '\*ABS\*' | wc -l), first number normal build
> > (not quite current CVS), second number custom build with invoking the
> > linker by hand and some options.
>
> Can you do a "grep 'R_386_32' | wc -l" for and after and a "grep
> 'R_386_JUMP_SLOT' | wc -l" for and after?

Yep, here:
libkdecore.so.3.0.0 : R_386_32 1708 - 955   R_386_JUMP_SLOT 1715 - 906
libkdesu.so.1.0.0 : R_386_32 37 - 6   R_386_JUMP_SLOT 157 - 119
libkdeui.so.3.0.0 : R_386_32 15660 - 12591   R_386_JUMP_SLOT 2870 - 1526
libkfile.so.3.0.0 : R_386_32 3392 - 2871   R_386_JUMP_SLOT 1008 - 693
libkhtml.so.3.0.0 : R_386_32 13134 - 1414   R_386_JUMP_SLOT 2310 - 874
libkio.so.3.0.0 : R_386_32 1183 - 689   R_386_JUMP_SLOT 837 - 458
libkjava.so.1.0.0 : R_386_32 321 - 321   R_386_JUMP_SLOT 227 - 227
libksycoca.so.3.0.0 : R_386_32 1017 - 522   R_386_JUMP_SLOT 789 - 456

The rest of the symbol based relocs are R_386_GLOB_DAT's and add up to the
other numbers minus 7 (the header lines of objdump output which isn't
removed by grep -v '\*ABS\*').


Ciao,
Michael.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic