Page MenuHomeFreeBSD

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

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

Details

Summary

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

Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24603
Build 23386: arc lint + arc unit

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.