LD Changes To Implicit DSO Linking Update

Ulrich Drepper drepper at redhat.com
Thu Feb 11 15:50:31 UTC 2010


On 02/11/2010 07:17 AM, Adam Jackson wrote:
> If your library libfoo uses symbols from libbar but does not
> itself link against libbar, that's still legal (although probably
> impolite).

It is not really correct, it works only by accident in most cases.  If 
the library with is linked with is using symbol versioning it doesn't 
work at all.  The code will likely fail because the used symbol version 
is actually the oldest and not the most recent.

There are only very few special cases when unresolved symbols are 
wanted.  E.g., if you have an app with a plugin system and the plugins 
can use symbols from the executable or other plugins.  Rare and fragile.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


More information about the devel mailing list