]> git.kaiwu.me - haproxy.git/commit
MINOR: sym: collect the symbols known to the dynamic linker
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 15 Sep 2026 13:07:53 +0000 (15:07 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 1 Oct 2026 15:06:31 +0000 (17:06 +0200)
commitf1ceaab24ccadf0e4cbb6542d88171cdd30cd025
tree5eab7b993801b62ed95a6873740a8b129ff6e2d9
parent268274379a1b61dd5cbd88c222efe05c0587da08
MINOR: sym: collect the symbols known to the dynamic linker

The dynamic linker keeps .dynsym/.dynstr of every loaded object mapped for
relocation. Where dl_iterate_phdr() exists, walk each object's PT_DYNAMIC
to collect its exported function symbols from the memory image, plus its
address range from PT_LOAD. This works even when files are unreadable (e.g.
after chroot) and gives what dladdr() sees, but lock-free.

When an address falls past the nearest lower symbol, resolve_sym_name() now
prints "sym+off/size" instead of a bare offset, easier to feed to gdb. Add
"tune.disable-elf-symbols" to restore the previous output.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c
src/sym.c