]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: add ability to dump loaded shared libraries
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Dec 2021 08:57:10 +0000 (09:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Dec 2021 15:59:00 +0000 (16:59 +0100)
commit6ab7b21a1108c0f187d09196dfc20d40f654e6c9
tree8afff2200858bbba734cec1e85c61d24c9c9fbbf
parent3f3a56c9b07175f342f30c6271df24f783c892c6
MINOR: debug: add ability to dump loaded shared libraries

Many times core dumps reported by users who experience trouble are
difficult to exploit due to missing system libraries. Sometimes,
having just a list of loaded libraries and their respective addresses
can already provide some hints about some problems.

This patch makes a step in that direction by adding a new "show libs"
command that will try to enumerate the list of object files that are
loaded in memory, relying on the dynamic linker for this. It may also
be used to detect that some foreign code embarks other undesired libs
(e.g. some external Lua modules).

At the moment it's only supported on glibc when USE_DL is set, but it's
implemented in a way that ought to make it reasonably easy to be extended
to other platforms.
doc/management.txt
include/haproxy/compat.h
include/haproxy/tools.h
src/debug.c
src/tools.c