Subject: Re: ldd /usr/lib/lib*.so vs. ldd /usr/pkg/lib/lib*.so
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 09/10/2000 22:48:41
On Sun, 10 Sep 2000, Eric Haszlakiewicz wrote:

: > Why do I have to add -lcrypto manually when linking with libssl?
: > Can't we make libssl pull in libcrypto automatically?
: > Looking at output of 'ldd /usr/lib/lib*.so' vs. 'ldd /usr/pkg/lib/lib*.so'
: > leads me to think that there's something missing in the base system...
: > What is it?
: 
: 	What's missing is the functionality in ld to remeber that the final
: binary it creates needs to be linked with everything that any library it
: links against says it links with.  Linkers from other OSes do this, but
: we don't.

The ELF linker (GNU ld) has no problems at all using shared library
interdependencies.  The a.out linker does handle interlibrary dependencies
too, albeit with a couple of glitches that don't come up in standard use.

The reason much of the base system doesn't use interlibrary dependencies on
a regular basis is because NetBSD has supported (and periodically still
supports) PICless code systems.  However, that's not an argument for
restricting third party software from making use of interlibrary
dependencies in the base system--they should be there regardless.

-- 
-- Todd Vierling <tv@wasabisystems.com>  *  http://www.wasabisystems.com/
-- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.