Clobbered C library warning
Operator
root at sherwood.prime.com
Tue Nov 14 07:25:08 AEST 1989
The warning about changing the shared 'C' library from Ken Olum is right
on target. We have run into his problem a bunch of times when attempting
to switch 'C' libs. Here are a couple of things I have learned:
1) NEVER use cp - it is dynamically linked and always gets mangled;
2) You MAY be able to get away with using install - it just uses reads
and writes, so the chances of overwriting some executing routine are
small. You can try this if your needs demand it, but I wouldn't bet the
farm on it.
3) The following are statically linked, so they always work. You can use
them to avoid c/trashing your system when you are playing with the
dynamic 'C' library:
tar - use this to move the library or to restore a good version from
tape, etc;
mv - use this to overwrite the version you want to replace.
sh - you can shutdown to single-user mode, use mv or tar to replace
the library, and then <cntl-D> back up to multi-usr mode.
cd - to get around.
To find out if a particular program is statically or dynamically linked,
use the ldd(1) command (not, however, that SUN in their infinite wisdom
made this dynamically linked, so ldd won't work if your 'C' lib is already
trashed).
Mark Hickey Computervision Division
O/S Development Prime Computer, Inc.
Bedford, MA 01730
UUCP : {decvax|linus|sun}!cvbnet!mhickey
Internet: mhickey at cvbnet.prime.com
More information about the Comp.sys.sun
mailing list