From: Mark Wielaard Date: Thu, 18 Nov 2021 20:34:57 +0000 (+0100) Subject: tests: Add -rdynamic to dwfl_proc_attach_LDFLAGS X-Git-Tag: elfutils-0.187~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4f766fa0f77a450a41bee1f8f8948306dfa3695;p=thirdparty%2Felfutils.git tests: Add -rdynamic to dwfl_proc_attach_LDFLAGS dwfl-proc-attach uses (overrides) dlopen (so it does nothing). This seems to cause a versioned dlopen symbol to be pulled in when building with LTO. Resulting in a link failure (when dlopen isn't integrated into libc): /usr/bin/ld: dwfl-proc-attach.o (symbol from plugin): undefined reference to symbol 'dlopen@@GLIBC_2.2.5' /usr/bin/ld: /usr/lib64/libdl.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Add -rdynamic to the LDFLAGS to add all symbols to the dynamic symbol table for dwfl-proc-attach. Signed-off-by: Mark Wielaard --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 26a4d6749..9dceda89f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2021-11-18 Mark Wielaard + + * Makefile.am (dwfl_proc_attach_LDFLAGS): Add -rdynamic. + 2021-11-11 Mark Wielaard * run-debuginfod-000-permission.sh: Don't set DEBUGINFOD_TIMEOUT. diff --git a/tests/Makefile.am b/tests/Makefile.am index bfb8b13ae..2298a5ae9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -717,7 +717,7 @@ strptr_LDADD = $(libelf) newdata_LDADD = $(libelf) elfstrtab_LDADD = $(libelf) dwfl_proc_attach_LDADD = $(libdw) -dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS) +dwfl_proc_attach_LDFLAGS = -pthread -rdynamic $(AM_LDFLAGS) elfshphehdr_LDADD =$(libelf) elfstrmerge_LDADD = $(libdw) $(libelf) dwelfgnucompressed_LDADD = $(libelf) $(libdw)