*BSD News Article 44964


Return to BSD News archive

#! rnews 2419 sserve.cc.adfa.oz.au
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!gatech!news.mathworks.com!news.kei.com!nntp.et.byu.edu!news.byu.edu!hamblin.math.byu.edu!park.uvsc.edu!usenet
From: Terry Lambert <terry@cs.weber.edu>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Major strcmp bug under BSD 2.0?
Date: 5 Jun 1995 21:13:17 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 55
Message-ID: <3qvs1d$oj6@park.uvsc.edu>
References: <3qfn52$188j@troy.la.locus.com> <3qo3m8$aq7@park.uvsc.edu> <3qvdsn$ioo@helena.MT.net>
NNTP-Posting-Host: hecate.artisoft.com

nate@trout.sri.MT.net (Nate Williams) wrote:
] >Luckily, of the programs that are distributes with FreeBSD, only
] >those in the /sbin and /usr/sbin directories (that's what the "s"
] >means) are statically linked.
] 
] Whoops, Terry should do his homework first. :-)
] 
] The 's' in sbin means 'system', and not static.  All of the programs in
] /bin and /sbin are statically to avoid problems when booting in
] single-user mode for fixing disks and such due to hardware/software
] failures.

Naw, if they were system, they wouldn't need to all be linked
statically.  There's nothing inherently beneficial in any binary
being statically linked if it's not accessed before ld.so is made
available (usually by mounting /usr: it's kept in /usr/libexec).

Several of us have argued for a long time that most system binaries
could be dynamically linked, with the exception of init.

Some of us have even proven it by running our systems that way.

The argument that it aids recovery is bogus unless you statically
link the entire tool chain needed to get a working ld.so.

As supporting evidence, on a Sun machine:

# ls /sbin
hostconfig  ifconfig    intr        sh
hostname    init        mount
# cd /bin
# ldd * 2>/dev/null | grep static
/bin/bar: statically linked
/bin/hostname: statically linked
/bin/ln: statically linked
/bin/mv: statically linked
/bin/sh: statically linked
/bin/tar: statically linked
#cd /usr/bin
# ldd * 2>/dev/null | grep static
bar: statically linked
hostname: statically linked
ln: statically linked
mv: statically linked
sh: statically linked
tar: statically linked


Everything else is dynamic.

                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.