PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols
Jakub Jelinek
jakub@redhat.com
Fri Jan 19 15:02:00 GMT 2007
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
More information about the Binutils
mailing list