Russ Allbery <r...@stanford.edu> 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 (r...@stanford.edu) <http://www.eyrie.org/~eagle/> _______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool