This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

symbol relocation during dynamic loading


I am using the --retain-symbols-file <filename> link option to restrict
the exported symbols from shared libraries. Using elfdump libName
--export to compare the exported symbols between libraries linked with
and without the --retain-symbols-file <filename> option indicates that
things worked as expected and I only get the symbols I want exported.
Also the size of the "restricted" library is smaller (as expected).

The question now is why the relocations are the same between the 2
libraries. If I set the LD_DEBUG environment variable to statistics and
load both libraries I end up with the same number of relocations. My
expectation was that the number of relocations would decrease and thus I
would end up with faster load times.

Can anyone explain why the number of relocations did not show any
changes?

Modified libraries (i.e. export list is used)
 27100:	runtime linker statistics:
     27100:	           final number of relocations: 140459
     27100:	final number of relocations from cache: 119151

Non modified libraries (i.e. all symbols are exported)
 8729:	runtime linker statistics:
      8729:	           final number of relocations: 140459
      8729:	final number of relocations from cache: 119151


Thanks,
Robert
-- 
Robert Schweikert <Robert.Schweikert@abaqus.com>
ABAQUS


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]