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? H.J.