[PATCH] ld/pdb: Avoid quadratic section lookup in handle_debugs_section
Oleg Tolmatcev
oleg.tolmatcev@gmail.com
Fri Nov 6 09:28:23 GMT 2026
пт, 6 нояб. 2026 г. в 10:18, Jan Beulich <jbeulich@suse.com>:
>
> On 02.11.2026 23:59, Oleg Tolmatcev wrote:
> > To map symbols to their sections, handle_debugs_section scanned all
> > symbols once per section, for every .debug$S section. With many
> > sections and symbols per object, this took about half of ld's time
> > when linking with --pdb.
> >
> > Use coff_section_from_bfd_index, which looks sections up in a hash
> > table cached on the BFD.
> >
> > ld/
> > * pdb.c (handle_debugs_section): Use coff_section_from_bfd_index
> > to find the sections of symbols.
>
> Okay.
>
> A remark on your sending of this and the other 5 patches: If they're
> meant to be a series, they should be numbered accordingly. A series
> ideally would also have a cover letter. If they're not meant to be a
> series, later patches shouldn't be replies to earlier ones.
>
> Jan
Sorry, I forgot to add "--no-thread" to "git send-email".
Thanks
Oleg
More information about the Binutils
mailing list