On Sun, Jan 28, 2018 at 01:54:25AM +0100, Szabolcs Nagy wrote: > * Stefan Fröberg [2018-01-28 00:07:33 +0200]: > > strace ./x > ... > > open("/root/batman/lib/libcrypto.so.1.1", O_RDONLY|O_CLOEXEC) = 3 > ... > > ldd x > >     /lib/ld-musl-x86_64.so.1 (0x7f22efa03000) > >     libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x7f22ef352000) > >     libc.so => /lib/ld-musl-x86_64.so.1 (0x7f22efa03000) > > this is a bug in musl ldd: if the executable > path has no / then it assumes origin is /, try > > ldd ./x > > then origin is ./ so it works as expected. Does the attached patch look ok? Alternatively we could fix the assumed invariant that p->name always contains a slash by having the loader code in __dls3 allocate a copy of argv[0] with "./" prepended, but that's a heavier cost at runtime and doesn't seem to have any practical advantages. Rich