HomeFreeBSD

libelf: Use a red-black tree to manage the section list.

Description

libelf: Use a red-black tree to manage the section list.

The tree is indexed by section number. This speeds up elf_getscn()
and its callers, which previously had to traverse a linked list. In
particular, since .shstrtab is often the last section in a file,
elf_strptr() would have to traverse the entire list.

PR: 234949
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20443

Details

Committed
markjJun 4 2019, 6:26 PM
Reviewer
emaste
Differential Revision
D20443: libelf: Use a red-black tree to manage sections
Parents
rS348651: MFC r348059: vt efifb: add suspend/resume calls
Branches
Unknown
Tags
Unknown