This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: OO.o / ld / -Bsymbolic patch ...
- From: "H. J. Lu" <hjl at lucon dot org>
- To: michael meeks <michael dot meeks at novell dot com>
- Cc: binutils <binutils at sources dot redhat dot com>,Matthias Huetsch <matthias dot huetsch at sun dot com>
- Date: Tue, 5 Jul 2005 08:46:23 -0700
- Subject: Re: OO.o / ld / -Bsymbolic patch ...
- References: <1120573049.7996.175.camel@linux.site>
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.