On Sat, Jan 21, 2017 at 10:58:59AM +0100, Mark Kettenis wrote: > The problem here is that the code uses the SHA1 functions in > libcrypto, but doesn't explicitly link against that library. With our > ancient binutils we don't notice this, because we link against libtls, > which as a DT_NEEDED entry for libcrypto. But lld doesn't fall for > this. And I believe modern binutils don't do this either.
Yes, GNU decided at some point that you are only supposed to use symbols from a library you also have a DT_NEEDED entry for. Of course, the dynamic linker doesn't know that, so the link time view doesn't necessarily reflect what the runtime linker is doing. I still have on my TODO list to fix lld, so that the behavior at least is optional. Joerg
