This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Slow linker with shared C++ libraries
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 26 Feb 2004 07:09:00 +0100
- Subject: Re: Slow linker with shared C++ libraries
- References: <20040226061928.GA11835@lucon.org> <20040226074224.GA13101@lucon.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 25, 2004 at 11:42:24PM -0800, H. J. Lu wrote:
> On Wed, Feb 25, 2004 at 10:19:28PM -0800, H. J. Lu wrote:
> > If a shared C++ library has many weak data definitions and many
> > symbols, linking against such libraries can be very slow since
> > elf_link_add_object_symbols has to go through all symbols for
> > each referenced weak data definition to search for its aliases,
> > although in most cases there is no alias. What is the best way
> > to speed it up? Can we introduce a linker command not to check
> > aliase for a DSO?
> >
>
> I am thinking about adding a special note section which contains the
> symbol alias information so that the linker doesn't have to go through
> the whole symbol list even though a symbol may have no alias at
> all.
Or you perhaps could when reading symbols qsort them by value and build
the alias info yourself at symbol read time.
Jakub