[klibc] Re: [PATCH] Avoid using dc in git-count-objects

Herbert Xu herbert at gondor.apana.org.au
Sat Oct 29 15:12:38 PDT 2005

On Sat, Oct 29, 2005 at 10:14:32AM -0700, H. Peter Anvin wrote:
> >OK, I've got it to build with klibc using klcc:
> >
> >$ size src/dash
> >   text    data     bss     dec     hex filename
> >  63333     356    5940   69629   10ffd src/dash
> klcc will happily provide that terribly long list for you (including 
> -Os), so you probably couldn't.

You'd be surprised.  It didn't do fomit-frame-pointer and regparms at
least.  Adding all the options that klibc's Makefile does gives:

$ size src/dash
   text    data     bss     dec     hex filename
  61749     356    5940   68045   109cd ../klibc/src/dash
$ ls -l src/dash
-rwx------  1 herbert greathan 62580 Oct 30 08:47 src/dash

That's with job control enabled.  Turning it off gives:

$ size src/dash
   text    data     bss     dec     hex filename
  60417     324    5940   66681   10479 src/dash
$ ls -l src/dash
-rwx------  1 herbert greathan 62068 Oct 30 09:06 src/dash

I bet it'll shrink by at least 800 bytes still if we tell ld to not
pad the segment start to page size.  That's statically linked too so
it'll get even smaller when it's shared.

This passes all my regression tests under 2.6 apart from tilde
expansion and ulimit which doesn't work due to klibc restrictions.

So how about putting this into klibc instead of klibc's ash?

Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

More information about the klibc mailing list