libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Several questions about libtool


From: Russ Allbery
Subject: Re: Several questions about libtool
Date: Fri, 06 Jan 2012 18:18:02 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Russ Allbery <address@hidden> writes:

> I don't believe this is correct.  GNU/Linux does not add implicit
> dependencies at link time; it only links with the libraries that you
> explicitly list.  ELF doesn't require that all symbols be resolved during
> the link, only the symbols in the thing that you're linking.

And, I should add, it's not necessarily the case that even this is
required, although that varies.  The default on GNU/Linux is to not care
about unresolved symbols in shared libraries (but to care about them in
executables).  So you can generate a shared library that can't be used
without linking with other shared libraries.  But this is certainly not
good practice; the behavior is there to support dynamically loadable
modules that should have unresolved symbols that are resolved by the
binary that's loading them, such as Apache modules.  Shared libraries
should always be linked with all libraries that they use *directly* (and
should never be linked with libraries that they use only indirectly) on
ELF systems with proper run-time linker support for transitive NEEDED
(which I believe is all of them in common use).

-- 
Russ Allbery (address@hidden)             <http://www.eyrie.org/~eagle/>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]