Subject: Re: static bin

From: [email-masked] (Theodore Ts'o)
Date: Wed, 8 Apr 92 23:27:12 -0400

Date: Wed, 08 Apr 92 17:20:00 BST
   From: [email-masked]
   Myname: A. V. Le Blanc

   I'm not sure why you need to have eveything in /bin statically
   linked.  I've moved the lib92.xx.xx on my systems to lib
   instead of having a pointer there; this eliminates (in practice)
   the likelihood that I'll delete some gcc2 directory by accident.

No, you don't need *everything* in /bin to be statically linked.
However, it is wise to make /bin/ls, /bin/cp, /bin/mv, and /bin/sh be
statically linked.  That way, you do surgery on the shared library
without losing big-time.  Otherwise, you could replace the library with
a new one that turns out to bad, and you would be up the creek without a
paddle.  It's not you might delete them by accident, but that you might
replace them with a new version that turns out to be built wrong.  

This tends to be relatively common in SunOS, when you are ripping out
YP, and replacing it with DNS --- if you screw up while doing surgery on
libc.a, only /bin/mv on SunOS is statically linked.  So you what you
have to do is to copy the new libc.a to libc.a.new, move the old libc
out of the way (thus breaking all other programs except for /bin/mv) and
then move the new libc.a into place.  If you're lucky, things start
working again.  If you're not lucky, everything's broken except for
/bin/mv, which you use to move the old libc.a back into place.  But that
gets really hairy.  It would be nice to have a few more tools (like ls
and cp) when you're doing surgery on shared library files.

							- Ted