BUILD: tools: rely on __ELF__ not USE_DL to enable use of dladdr()
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 09:31:58 +0000 (10:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2020 15:09:20 +0000 (17:09 +0200)
commite00e95c4033564b7ee5a3812be703fe8697d12b0
treec3a429b4ba4d3be0226336dc9ae0f5341db70106
parentca91dea2d016185cf1059e8aaa0a1bcf8c58c3e2
BUILD: tools: rely on __ELF__ not USE_DL to enable use of dladdr()

The approach was wrong. USE_DL is for the makefile to know if it's required
to append -ldl at link time. Some platforms do not need it (and in fact do
not have it) yet they have a working dladdr(). The real condition is related
to ELF. Given that due to Lua, all platforms that require -ldl already have
USE_DL set, let's replace USE_DL with __ELF__ here and consider that dladdr
is always needed on ELF, which basically is already the case.

(cherry picked from commit 109201fc5c64ea1ae98e8f75f6890efa88d981bf)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/standard.c