Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-25 Thread Dmitry V. Levin
On Sat, Nov 20, 2021 at 03:18:27PM +0100, Mark Wielaard wrote: > Hi, > > On Sat, Nov 20, 2021 at 01:12:17AM +0300, Dmitry V. Levin wrote: > > On Fri, Nov 19, 2021 at 05:58:19PM +0100, Florian Weimer wrote: > > > It may have to do with --as-needed that some builds use. If there are > > > no pendin

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-25 Thread Mark Wielaard
Hi, On Sat, 2021-11-20 at 15:18 +0100, Mark Wielaard wrote: > On Sat, Nov 20, 2021 at 01:12:17AM +0300, Dmitry V. Levin wrote: > > On Fri, Nov 19, 2021 at 05:58:19PM +0100, Florian Weimer wrote: > > > It may have to do with --as-needed that some builds use. If there are > > > no pending undefined

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-20 Thread Mark Wielaard
Hi, On Sat, Nov 20, 2021 at 01:12:17AM +0300, Dmitry V. Levin wrote: > On Fri, Nov 19, 2021 at 05:58:19PM +0100, Florian Weimer wrote: > > It may have to do with --as-needed that some builds use. If there are > > no pending undefined references, some linkers drop earlier shared object > > referen

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-19 Thread Dmitry V. Levin
On Fri, Nov 19, 2021 at 05:58:19PM +0100, Florian Weimer wrote: > * Dmitry V. Levin: > > > Let's make clear what's going on here. First of all, dwfl-proc-attach.c > > does not use dlopen so it doesn't pull it in and doesn't need -ldl. > > In regular builds, dwfl-proc-attach.o is linked with ../li

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-19 Thread Florian Weimer via Elfutils-devel
* Dmitry V. Levin: > Let's make clear what's going on here. First of all, dwfl-proc-attach.c > does not use dlopen so it doesn't pull it in and doesn't need -ldl. > In regular builds, dwfl-proc-attach.o is linked with ../libdw/libdw.so > which in turn uses dlopen and is already linked with -ldl.

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-19 Thread Mark Wielaard
Hi Dmitry, On Fri, Nov 19, 2021 at 01:20:26AM +0300, Dmitry V. Levin wrote: > On Thu, Nov 18, 2021 at 10:23:41PM +0100, Mark Wielaard wrote: > > 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

Re: [PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-18 Thread Dmitry V. Levin
On Thu, Nov 18, 2021 at 10:23:41PM +0100, Mark Wielaard wrote: > 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): > > /us

[PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS

2021-11-18 Thread Mark Wielaard
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 s