[BusyBox] Re: [BusyBox-cvs] svn commit: trunk/busybox: include networking

Erik Andersen andersen at codepoet.org
Wed Jul 27 03:28:53 MDT 2005


On Wed Jul 27, 2005 at 12:55:38AM -0600, landley at busybox.net wrote:
> This creates a new header file, bb_config.h, which sets the CONFIG entry to 1
> or 0, and lets us do:
> 
>   if(CONFIG_THING) stuff();
> 
> And let the compiler do dead code elimination to get rid of it.  (Note: #ifdef
> will still work because for the 1 case it's a static const int, not a #define.)

Using static ints works, but has the downside of adding roughly
700 bytes of static ints (for the default config) to the .text
section of each and every .o file.  These days, busybox has an
awful lot of .o files, compounding the pain.  With make defconfig
there are 268 .o files.  With revision 10929 therefore, compared
to revision 10928, we see an immediate size increase of ~150k:

	$ size busybox.old busybox.static_ints
	   text    data     bss     dec     hex filename
	 244599    2312   36800  283711   4543f busybox.old
	 393172    2312   36800  432284   6989c busybox.static_ints

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--


More information about the busybox mailing list