[BusyBox] e2fsbox from e2fsprogs-1.19.tar.gz. Anyone interested.

Tomi Ollila Tomi.Ollila at sonera.com
Mon May 21 01:16:49 UTC 2001


Friday May 18 15:00:55 +0000 2001 Tom Oehser <tom at toms.net> wrote:
> 
> > Out of curiousity, why are you bothering with the e2fs shared libs if you're
> > building a multicall e2fs program?  Why not just staticly link against the
> 
> I am not  building a multicall e2fs program.  I am offering my normal
> non-multicall sizes as being not much bigger in aggregate than the
> multicall one is, and wondering why there isn't more savings available.

Perhaps because I did not do any size optimization (at least just now),
I wrote that info (size 163640) as last thought I got just before sending
that e-mail .. the point of the e-mail was intended to be this e2fsbox
functionality.

I just wanted e2fsprogs commands (probably not all, but at the moment I
have all included) that only requires shared c -library. I am building
highly customized one floppy linux and the less "moving parts" there is,
the better...

I'd say, that using same compiler, same options etc, building a
multi-call-binary will result smaller results (how much smaller, is
different story). Only one startup code is needed, static linking
to some of the libraries gives no overhead compared to dynamic linking.

I did one startup code:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
$ echo 'int main () {}' > x.c
$ gcc x.c
$ ls -l a.out
-rwxr-xr-x    1 too      too         13555 May 21 09:00 a.out*
$ strip a.out
$ ls -l a.out
-rwxr-xr-x    1 too      too          3072 May 21 09:00 a.out*
$ sstrip a.out
$ ls -l a.out
-rwxr-xr-x    1 too      too          1408 May 21 09:00 a.out*

Exactly same sizes (suprisingly ;) w/ gcc -Os x.c

Running `size a.out' before sstripping, outputs:

   text	   data	    bss	    dec	    hex	filename
    929	    228	     24	   1181	    49d	a.out

...

$ gcc -c -Os e2fsbox.c
$ size e2fsbox.o
   text	   data	    bss	    dec	    hex	filename
   1210	     84	      0	   1294	    50e	e2fsbox.o


.. e2fsbox.o is quite large due to the verbosity it offers to the user --
a much smaller replacement can be easily done.

> 
> -Tom

Tomi





More information about the busybox mailing list