This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols
- 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: Fri, 19 Jan 2007 16:05:24 +0100
- Subject: Re: PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols
- References: <20060829230012.GA19841@lucon.org> <20070119144609.GI3819@sunsite.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jan 19, 2007 at 03:46:09PM +0100, Jakub Jelinek wrote:
> I wonder if we can't combine the benefits of both approaches.
If we keep your symbuf arrays per-bfd rather than per-section,
then either we don't sort the symbols at all and just
do what my patch is doing, linearly scanning all isyms to pick
the ones for current section (which can be worst case twice slower
than the current search), or we can e.g.
avoid putting SHN_UNDEF symbols into the symbuf array altogether
and sort the rest just based on shndx (no ELF_ST_BIND sorting)
through an indirection (qsorting array of integers or array
of pointers is far cheaper than qsorting array of 32 byte structures).
But then we should use a binary search rather than scan linearly.
Jakub