Base X11 libraries cleanup

Hans de Goede j.w.r.degoede at
Fri Jun 30 07:23:20 UTC 2006

Adam Jackson wrote:
> Ideally, all libraries should report zero unused direct dependencies
> when inspected with ldd -r -u.  Although in some sense unused libraries
> are harmless, they do put needless pressure on the kernel's VM since all
> processes linked with the affected libraries have to map many more
> files, and in principle you can get unexpected behaviour when symbols
> don't resolve the way you expect due to namespace collisions.
> Several of the core X libraries fail this, for not particularly good
> reasons.  I've fixed most of them by now, but there's one or two
> stragglers still.
> The side effect of this is that the culled libraries will not be
> included in the linker search scope for any libraries or applications
> above them in the stack.  For example, libXaw no longer links against
> libSM, so if your application linked against libXaw and not libSM, but
> used symbols from libSM, it may now fail at runtime claiming that some
> symbols could not be resolved.  If this happens, the affected package
> needs to be fixed to link against all appropriate libraries directly.
> I doubt anyone will actually run into that, but I wanted to give a heads
> up in case it does happen.
> (Ideally we should be able to do this for the entire OS.  Baby steps.)
> - ajax

How about using ld --as-needed, AFAIK that has come up before and would
be a great improvement!

Whats holding us back from linking with --as-needed by default?



More information about the Fedora-maintainers mailing list