Page MenuHomeFreeBSD

libelf: Use a red-black tree to manage sections
ClosedPublic

Authored by markj on May 28 2019, 3:29 PM.

Details

Summary

The tree is indexed by section number. This speeds up elf_getscn(3),
which in turn helps other functions. For example, elf_strptr() needs to
look up .shstrtab, which is typically the last section.

Diff Detail

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

Event Timeline

markj created this revision.May 28 2019, 3:29 PM
markj updated this revision to Diff 57997.May 28 2019, 3:34 PM
  • Remove unintentional change.
arrowd added a subscriber: arrowd.Jun 1 2019, 7:56 PM
emaste added a subscriber: csjp.Jun 4 2019, 3:47 PM
emaste added a comment.Jun 4 2019, 3:50 PM

sys/tree.h works on all supported operating systems? (for upstreaming)

Overall LGTM

markj added a comment.Jun 4 2019, 3:52 PM

sys/tree.h works on all supported operating systems? (for upstreaming)

Yes, it comes with libbsd, which is already required for queue.h etc..

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