Subject: Re: net/bind8's libbind vs. libc and static linking....
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: David Laight <>
List: tech-pkg
Date: 07/09/2002 09:59:30
> I'd also like to ask what happens when there are conflicts between
> static-loaded symbols and dynamic-loaded symbols.  Are the shared
> library versions "safe" and separate -- i.e. still used by the
> references within the library while the static versions are used by the
> main program into which they're linked?

Dunno about netbsd's dynamic loader, but IIRC the SVR4 one will look
for symbols in the program when fixing up a shared library.
ie the library has default routines/variables that are used if
the program doesn't define them.

I used to build shared libraries by cating all the .c files together
into one big chunk - so that the only visible symbols were those
required by the external interface, and a different routine
was used for internal and external calls.

The name2addr libraries had to play 'hunt the external variable'
when looking for the copy on nd_error that the caller would be


David Laight: