[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what's the best small shell for initrd?



On Tue, Jul 17, 2001 at 09:28:03PM +0200, Russell Coker wrote:

> As an aside, why does sleep link with so many things?  It seems strange for
> such a small program to take 1500K of memory (500K RSS) and link with 4
> shared libraries when essentially all it does is parse argv and make a single
> system call...

libpthread is pulled in by librt, which is needed for clock_gettime.  libm is
needed for fesetround.

libm should be easy to eliminate, but may be used by many other tools and not
worth the trouble.  sleep can be compiled to use gettimeofday instead of
clock_gettime, but I don't know what the side effects would be.

-- 
 - mdz



Reply to: