*BSD News Article 31974


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:11071 gnu.misc.discuss:15339
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!csulb.edu!paris.ics.uci.edu!news.claremont.edu!bridge2!usenet.coe.montana.edu!bsd.coe.montana.edu!nate
From: nate@bsd.coe.montana.edu (Nate Williams)
Newsgroups: comp.os.386bsd.questions,gnu.misc.discuss
Subject: Re: Taylor UUCP on FreeBSD???
Message-ID: <2u7tcb$6mr@pdq.coe.montana.edu>
Date: 21 Jun 94 23:33:31 GMT
References: <1994Jun13.040754.17764@kosman.uucp> <GOWEN.94Jun21084913@presto.cs.tufts.edu> <2u73ti$egn@glitnir.ifi.uio.no> <RSANDERS.94Jun21155032@hrothgar.mindspring.com>
Organization: Montana State University, Bozeman  Montana
Lines: 51
NNTP-Posting-Host: 153.90.192.29

In article <RSANDERS.94Jun21155032@hrothgar.mindspring.com>,
Robert Sanders <rsanders@mindspring.com> wrote:
>In article <2u73ti$egn@glitnir.ifi.uio.no> kjetilho@ifi.uio.no (Kjetil Torgrim Homme) writes:
>
>   +--- Greg Owen:
>   | And on machines with dynamic libs, /bin/sh should be statically
>   | linked, etc. etc.
>
>   Why is that? The chances for /lib/libc.so or /bin/sh getting hosed are
>   pretty similar...
>
>Well, that's a valid argument on Linux, but FreeBSD (and I suppose
>NetBSD) think that shared libraries belong in /usr/lib.  I disagree,

As a FreeBSD developer, I'll give a quick WHY we did it that way.

1) / (root) should be small.

2) Given the above, putting the entire shared library in /root makes
   no sense due to size, even offsetting the savings in the small
   number of shared binaries.

3) Breaking up a standalone library for the root partition is wasteful
   since the code will be also needed for other binaries.

4) In the case of a bad crash using the Mach VM system in BSD systems you
   *CAN* corrupt the running binary, which in the case of shared binaries
   can be the shared library.  (The way paging is done)

5) ld.so doesn't NEED to be in /root, and there is less likely for
   something bad to get hosed up when doing updates.  The more dependant
   you are on particular tools, the more likely one of them is to break.
   Upon bootup there are 2 CRITICAL binaries.  'init' and 'sh' for
   safety reasons should be linked static IMHO.

>install bash as /bin/sh because ash just wouldn't cut several scripts
>we used.

Fix ash. :-)

>We had "forgotten" to link /bin/sh statically.

Using the default build tools makes sure that ash IS linked statically.


Nate
-- 
nate@bsd.coe.montana.edu     |  FreeBSD core member and all around tech.
nate@cs.montana.edu          |  weenie.
work #: (406) 994-4836       | 
home #: (406) 586-0579       |  Available for contract/otherwise work.