Slow lang_insert_orphan
Nick Clifton
nickc@redhat.com
Fri Mar 18 10:45:00 GMT 2005
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
More information about the Binutils
mailing list