Subject: Re: dynamically loadable nsdispatch callback functions
To: David Laight <david@l8s.co.uk>
From: Luke Mewburn <lukem@wasabisystems.com>
List: netbsd-help
Date: 04/09/2002 19:32:34
On Mon, Apr 08, 2002 at 11:58:00AM +0100, David Laight wrote:
| IIRC Solaris and SVR4 both allow 'statically' linked binaries to
| dlopen() libraries - although you do need to specify -ldl when
| building them. In particular the password functions would dlopen()
| libnsl.so (and then the name to address libraries) in order to
| use NIS (et al).
|
| In fact these 'static' programs were probably 'dynamic' but were
| linked with the archive libc - so didn't actually need any shared
| libraries.
It's also a matter of whether the shared linker is available.
Solaris (2.6) has a *few* programs in /sbin statically linked, a
few more dynamically linked with /etc/lib/ld.so.1 as the linker
and with -ldl (/etc/lib/libdl.so.1), and a few statically linked
recovery tools in /usr/sbin/static. This is not the best system
for recovering from, and if /usr is a separate partition (the
default Solaris install!, although I merge / and /usr on my Solaris
installs) it can be rather difficult to recover the system if /usr
gets hosed or /etc/vfstab or /etc/system gets out of whack (etc).
This is a situation we would want to avoid in NetBSD, and is avoided
in my "dynamic link the `user visible' world" proposal.
Luke.