bug-coreutils
[Top][All Lists]
Advanced

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

Re: --enable-tiny option


From: Robert Millan
Subject: Re: --enable-tiny option
Date: Sat, 1 Nov 2003 19:33:35 +0100
User-agent: Mutt/1.5.4i


Ok, I'm attaching a patch for gnu cat. It's not finished and still has a lot
of room for improvement, but should be enough as a proof of concept.

Results for stripped binaries on my system are (in bytes):

  5396    build.old/src/cat.o
  3172    build/src/cat.o

  16696   build.old/src/cat
  14392   build/src/cat

Some thoughts:

 - The code is more readable if we alter the order of command-line options,
   so that extra features are displayed together and can be #if'ed out in
   one block. I opted to display POSIX features first and then GNU extensions,
   any preference on this?
 - I believe my "poor man's malloc" hack would be optimal with an "int" on
   i386, but I can't tell for other CPUs. Do you want "char" or "int"?
 - Looking at the unlinked object I saved more than 2 KBs. But most of the
   space seems to be eaten by libfetish when linking it staticaly. Do you
   think it's viable to discard parts of libfetich that might not be needed
   in our new ripped-down gnu cat?

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T, Ainulindale (Silmarillion)

Attachment: cat.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]