OO.o / ld / -Bsymbolic patch ...
H. J. Lu
hjl@lucon.org
Tue Jul 5 15:46:00 GMT 2005
On Tue, Jul 05, 2005 at 03:17:29PM +0100, michael meeks wrote:
> Hi guys,
>
> This is my 1st post here; please be patient with me - no doubt I'm
> horribly ill-informed; furthermore my patch is for discussion purposes &
> is clearly not suitable for merging in it's current form.
>
> So - my problem is; OO.o startup is dog slow - everyone likes to blame
> OO.o for this, but arguably it's a pure infrastructural problem; it
> starts faster under Wine on the same system eg.
>
> Everything was better in the olden-times when one could use -Bsymbolic
> on C++ [correct me if I'm wrong], but then the C++ ABI changed pwrt.
> exception handling such that we had to honour weak symbols globally. We
> stopped using -Bsymbolic.
>
> OO.o startup performance then sucked so, so badly that we spent ages
> marking everything up with visiblity attributes. This improved matters
> somewhat. However - we still have a huge number of relocations.
> To give some idea - on warm start, we take ~4secs on my machine, and
> ~25% of that is processing relocations ;-) this is not good.
>
> So - part of the problem is that we do lots of unnecessary work wrt.
> internal relocations; the attached patch reduces the total OO.o rel.plt
> relocations by ~20% and the total relocation count by nearly 1/2
> (rel.dyn + rel.plt[1]).
>
I have been trying to address it with this patch
http://sourceware.org/ml/binutils/2005-05/msg00199.html
If you use the current Linux binutils, you can apply -Bsymbolic to
individual symbols selectively.
H.J.
More information about the Binutils
mailing list