From 8f7b22ea2a95ccab6aeaddcdee7472dbdbcfb4d3 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 25 Mar 2021 16:32:46 +0000 Subject: libctf: fix ELF-in-BFD checks in the presence of ASAN The address sanitizer contains a redirector that captures dlopen calls, so checks for dlopen with AC_SEARCH_LIBS will always conclude that dlopen is present when the sanitizer is on. This means it won't add -ldl to LIBS even if needed, and the immediately-following attempt to actually link with -lbfd will fail because libbfd also needs dlsym, which ASAN does *not* contain a redirector for. If we check for dlsym instead of dlopen, the check works whether ASAN is on or off. (bfd uses both in close proximity: if it needs one, it will always need the other.) libctf/ChangeLog 2021-03-25 Nick Alcock * configure.ac: Check for dlsym, not dlopen. * configure: Regenerate. --- libctf/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libctf/ChangeLog') diff --git a/libctf/ChangeLog b/libctf/ChangeLog index d4a94bb..e66224a 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,5 +1,10 @@ 2021-03-25 Nick Alcock + * configure.ac: Check for dlsym, not dlopen. + * configure: Regenerate. + +2021-03-25 Nick Alcock + * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't leak buf. -- cgit v1.1