This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols


On Fri, Jan 19, 2007 at 04:20:19PM +0100, Jakub Jelinek wrote:
> On Fri, Jan 19, 2007 at 04:05:24PM +0100, Jakub Jelinek wrote:
> > 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.
> 
> BTW, unless you plan to reuse elf_tdata (bfd)->symbuf in some other
> place, bfd_elf_match_symbols_in_sections only ever looks at
> st_info, st_other, st_shndx st_name of the internal symbols.
> So to save memory, you can very well also just save that data and
> nothing else (nor the undef symbols and save more than 50% of memory on
> this).

I can't reproduce

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223181

with the current binutils in CVS. I believe the Linux binutils
2.17.50.0.9 is also OK.  We can certainly improve it further.  But
I don't believe it is a major problem.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]