[PATCH] tests: Add -ldl to dwfl_proc_attach_LDFLAGS
Thu Nov 25 13:35:30 GMT 2021
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 references, some linkers drop earlier shared object
> > > references with --as-needed (similar to what happens with static
> > > archives).
> > >
> > > The GCC LTO plugin results in ld looking at more objects in greater
> > > detail for some reason. Without LTO and --as-needed, you probably don't
> > > get a dlopen export (if you do not link with -E) because indirect
> > > dependencies are not consulted, breaking the valgrind workaround because
> > > there is no interposition.
> > Thanks. I suppose adding -rdynamic to dwfl_proc_attach_LDFLAGS should be
> > a more correct fix.
> That works. But I don't really understand why.
> Does the attached patch look OK to you?
I decided to simply disable LTO on Fedora 34, but still would like
feedback on this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1742 bytes
Desc: not available
More information about the Elfutils-devel