]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: improve symbol resolution without dl_addr
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Mar 2025 16:21:24 +0000 (17:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 Mar 2025 16:30:48 +0000 (17:30 +0100)
commite920d73f598bd770a5dc861074268d1b2db4de59
tree18604054e68e55190a87b518e50b52f7ff14d27c
parent1e99efccef21394f0b5e5940001aaee8b3cd6b4b
MINOR: tools: improve symbol resolution without dl_addr

When dl_addr is not usable or fails, better fall back to the closest
symbol among the known ones instead of providing everything relative
to main. Most often, the location of the function will give some hints
about what it can be. Thus now we can emit fct+0xXXX in addition to
main+0xXXX or main-0xXXX. We keep a margin of +256kB maximum after a
function for a match, which is around the maximum size met in an object
file, otherwise it becomes pointless again.
src/tools.c