Diagnostics for missing libraries in DSOs
Florian Weimer
fweimer@redhat.com
Mon Aug 22 14:29:00 GMT 2016
Currently, it is extremely easy to produce a DSO which links against
compat symbols at run time: Just omit a required DSO when invoking the
static linker. As a result, the symbol reference in the created DSO
will lack a version, and will be bound to a compat symbol at run time:
https://sourceware.org/bugzilla/show_bug.cgi?id=20489
This is very difficult to diagnose properly. It can also lead to
current binaries reintroducing historic bugs which we did not want to
push on applications for backwards compatibility reasons.
What can we do here? Can we provide a diagnostic at static link time?
Should ld.so print a run-time diagnostic?
Non-versioned to versioned symbol bindings happen quite frequently
outside glibc (right after a library has introduced symbol versioning).
But perhaps we can produce a run-time warning if such a binding occurs
when the referring object lacks a DT_NEEDED entry for the referent.
Florian
More information about the Binutils
mailing list