]> git.kaiwu.me - haproxy.git/commit
MINOR: sym: add helpers to collect the symbols of an ELF image
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 15 Sep 2026 15:48:50 +0000 (17:48 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 1 Oct 2026 15:06:31 +0000 (17:06 +0200)
commit0915bfbc1f8fd1a40e70dfa6292f517d23844ab1
tree3e11a875d6983331c5872a8a65c939713992c261
parentf1ceaab24ccadf0e4cbb6542d88171cdd30cd025
MINOR: sym: add helpers to collect the symbols of an ELF image

The next commits read symbols from ELF images (an embedded compressed table
and the object's file), and both need the same primitives, so introduce
them here: validate an ELF header and its section header table, keep every
read inside the image, find .symtab and its string table, and collect its
function symbols into the builder, applying the object's load address.
Parsing an ELF image needs no help from the dynamic linker, so they are
gated on __ELF__ alone; only enumerating the loaded objects needs
dl_iterate_phdr().

They are tagged __maybe_unused because their users come in later commits,
which may be picked independently.
src/sym.c