This is the mail archive of the binutils@sources.redhat.com 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: Slow lang_insert_orphan


Hi H. J.

When we have many orphaned sections, lang_insert_orphan spends lots
of time in

/* Unlink the section.  */
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
  continue;

It is the case of 64K section ld test. Use a doubly linked list
for section may help. But it will add a pointer to bfd_section. Should
I give a try?

I am reluctant to increase the size of the bfd_section structure. Maybe lang_insert_orphans() could be made smarter with a different algorithm ? Possibly it could keep a local bitmap or list of sections to unlink and then only unlink them all right at the end ?


Cheers
  Nick



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