Use ld to tell the full library path?
Jeffrey Walton
noloader@gmail.com
Mon May 6 02:03:00 GMT 2019
Hi Everyone,
My apologies if this is the wrong approach to a problem...
I'm trying to test OpenSSL with Address Sanitizer (Asan). OpenSSL uses
their own practices in their build system, so the compiler/linker
cannot place Asan libraries first in the list (apparently this is an
Asan requirement).
The recommended workaround is to use LD_PRELOAD on Linux. Which leads
me to... is there a way to have ld tell me which Asan library will be
used when I use an option like -fsanitize=address or -lasan?
In Bash I was thinking something like:
ASAN_LIB=$(ld -lasan)
LD_PRELOAD="$ASAN_LIB:LD_PRELOAD" make check
Thanks in advance
More information about the Binutils
mailing list