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 > > 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? Thanks, Mark