From: Jim Winstead Jr. (jwinstea@jarthur.claremont.edu)
Date: 05/15/92


From: jwinstea@jarthur.claremont.edu (Jim Winstead Jr.)
Subject: Re: Don't use linked libs for crutial stuff [was:Re: rc Shell Under Linux]
Date: Fri, 15 May 1992 22:04:17 GMT

In article <1992May15.134921@hammer.Prime.COM> cummings@hammer.Prime.COM (Kevin Cummings) writes:
>In article <1992May14.181343.21837@news.stolaf.edu>, johnsonm@mari.acc.stolaf.edu (Michael K. Johnson) writes:
>> In article <1992May14.130424.16522@wam.umd.edu> joel@wam.umd.edu (Joel M. Hoffman) writes:
>>
>> I think that the regular rootimage disk should use shared libs, but
>> that an emergency rootimage disk that uses only staticly linked stuff
>> should be available for fixing things. Jim -- could you make this as
>> well? I hate to volunteer you, but you've done a good job so far...
>
>Assumptions:
> 1) /bin is for programs that are needed to cold start the system,
> and must be capable of running even if /usr is not yet mounted.
> 1a) other programs in /bin are to help recover from system
> catastrophies (like /usr died) and must also be self contained.
> 2) shared libs are installed in /usr/lib.

Not really. They are installed in /lib. They are linked to
/usr/lib/shared or something like that by the GCC 2.1 install script,
but they really should be moved to /lib.

> 3) programs in /usr/bin can have dependancies on /usr/lib.
> programs in /bin can't.

Right, programs in /bin should not depend on the /usr hierarchy.

> 4) There should be no LARGE libraries in /lib.

Remember, the shared image for libc.a is only 100k. That's smaller
than bash by a factor of three. I would not call it a large library,
especially with the savings offered.

>Conclusions:
> 1) programs in /bin must be statically linked and be able to
> be run without /usr yet mounted.

I still disagree. /bin could be statically linked and able to run
without /usr mounted - /lib should be part of the root partition.

> 2) programs in /usr/bin can depend on shared libs.

>Shouldn't the root disks be set up in this way?

There are only about four utilities in /usr/bin on the root image, so
it would be silly to include a shared library in /lib for only those
three images.

However, if the binaries in /bin are linked against the shared
library, the savings could be substantial.

-- 
                                    +    Jim Winstead Jr. (CSci '95)
                                    |            Harvey Mudd College
                                    | jwinstea@jarthur.Claremont.EDU
                                    + This is all my words.  Honest!