[Talk] State of dynamic linking in various platforms...

Edwin Groothuis edwin at mavetju.org
Thu Aug 22 17:03:07 EST 2002


On Thu, Aug 22, 2002 at 04:21:50PM +1000, Greg Black wrote:
> Luke Mewburn wrote:
> 
> | On Thu, Aug 22, 2002 at 02:40:27PM +1000, Greg Black wrote:
> |   | In [FreeBSD] 4.x and 5.x /bin/rmail is dynamically linked and the rest of
> |   | /bin is static.  In 5.x /sbin/mount_smbfs is dynamically linked
> |   | and the rest of /sbin is static.
> | 
> | Are you sure that /bin/rmail isn't just a symlink to /usr/libexec/rmail
> | (for compatibility purposes)?  It's that way on NetBSD...
> 
> Yes, I'm quite sure -- file(1) distinguishes between symlinks
> and executables (on FreeBSD, anyway).  ANd I just checked a
> FreeBSD-4.6 box and it also has /bin/rmail dynamically linked.
> 
> | /sbin/mount_smbfs is probably an oversight :)
> 
> Perhaps.  I note that it's also dynamically linked on a 4.6 box,
> although that's not the case on my other 4.x boxes (where x is
> between 1 and 4).

Why they are not staticly linked is easy, it's the in Makefiles:
/usr/src/bin/rmail/Makefile:
    # Not much point this being static. It calls a shared sendmail...
    NOSHARED?= NO

/usr/src/sbin/mount_smbfs:
    # Needs to be dynamically linked for optional dlopen() access to
    # userland libiconv (see the -E option).
    #
    NOSHARED?=      NO

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.MavEtJu.org
edwin at mavetju.org    |    Weblog: http://www.mavetju.org/weblog/weblog.php 
bash$ :(){ :|:&};:   | Interested in MUDs? http://www.FatalDimensions.org/



More information about the Talk mailing list