Question about readelf output from shared library built with lld, gold, and bfd linkers
Nick Clifton
nickc@redhat.com
Mon Nov 21 14:14:09 GMT 2022
Hi Tom,
> Isee the following output from readelf for the lld, gold and bfd linkers
> (binutils 2.39, lld 14.0.6)
To be clear - this is not a readelf problem. It is showing you the correct
results. It is the fact that the three linkers are not producing identical
output and instead showing slight variations in their layout of the linked
binary that is bothering you, yes ?
In general variations in the layout like this should not make any difference
to the program#s startup time. There might - possibly - be variations in
performance due to affects like cache misses and the like, but this is hard
to quantify in isolation.
> Output below. Notice how the ordering is different in each case. The
> interesting thing about this is, and why I am looking at various
> differences between object code linked by these three linkers, is that I am
> trying to track down why startup times are slower due to relocations (based
> on the perf tool output). Would any of these differences make, well, a
> difference in startup time?
I don't think so. The number of relocations is the same, so the amount
of start up time spent resolving them should effectively be the same as
well.
I assume that you have compared started up times when linking with "-z now"
vs "-z lazy" ?
Cheers
Nick
More information about the Binutils
mailing list