Date: Sat, 20 Feb 1999 01:01:23 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: bright@cygnus.rush.net (Alfred Perlstein) Cc: gurudatt@cs.tamu.edu, freebsd-hackers@FreeBSD.ORG Subject: Fixing dlopen, ld.so, and upgrading the resolver Message-ID: <199902200101.SAA16228@usr02.primenet.com> In-Reply-To: <Pine.BSF.3.96.990218203910.10060P-100000@cygnus.rush.net> from "Alfred Perlstein" at Feb 18, 99 08:41:41 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > What libraries does one include to compile socket programs in freebsd? > > <Specifically, what are the freebsd equivalents of lnsl and lsocket on > > solaris?> > > They are mostly part of libc and therefor linked in by default. Basically > you do not need these libs. -lsocket is a lame SRV4 (i think) thing because > BSD sockets are simulated (poorly) via userland code. > > If you get any unresolved symbols check the function's manpage, or > us 'nm' on the libraries in /usr/lib to locate it. On the other hand, the -lnsl has been changed to -lresolve, and is standard on most platforms. The lack of this library in FreeBSD is caused by the resolver code being integrated into libc. It is probably time for this to change. It can still be *virtually* in libc in ELF by linking libc.so against libresolve.so (though I find this approach to be *highly* undesirable, since it means that things that link dynamically will need a different command line to link statically (e.g.: another library argument). By the same token, it's about time for an nsswitch, so that things like getpwent can be backed by password files or databases, for purposes other than authentication (e.g. PAM is useless for getting GECOS data out of an LDAP directory). PAM and an nsswitch imply a need for statically linked objects to be able to access dlopen and friends (or an end to static linking). SVR4 handles this with a libdlopen, and the execution class loader premaps the ld.so into all images. The library stub is basically jump table data for the premapped ld.so. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902200101.SAA16228>