This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
symbol relocation during dynamic loading
- From: Robert Schweikert <Robert dot Schweikert at abaqus dot com>
- To: binutils <binutils at sources dot redhat dot com>
- Cc: robert dot schweikert at abaqus dot com
- Date: 19 Apr 2004 15:46:56 -0400
- Subject: symbol relocation during dynamic loading
- Organization: ABAQUS
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