Page MenuHomeFreeBSD

strip: Use a lookup instead of a linear search through sections.

Authored by markj on May 30 2019, 5:04 PM.



Sections have unique indexes. Just use elf_getscn() to see if there's a
match. With libelf converted to do section lookups using a binary
search tree, this is much faster than iterating through all sections.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.May 30 2019, 5:04 PM
arrowd added a subscriber: arrowd.Jun 1 2019, 7:56 PM
emaste accepted this revision.Jun 4 2019, 3:50 PM

By inspection existing elf_getscn mirrors the logic of the existing while loop here

This revision is now accepted and ready to land.Jun 4 2019, 3:50 PM
This revision was automatically updated to reflect the committed changes.