Discrepancy? uClibc seems very large

Ersin Akinci ersin.akinci at gmail.com
Fri Sep 25 18:34:33 UTC 2009


Hi all,

I'm developing a custom floppy-based distro for my ancient P5 laptop,
and so naturally I've delved into the world of uClibc, buildroot, and
busybox.  As I've been compiling, I've noticed something that seems
strange to me.  When I compile busybox and link it statically using
the buildroot toolchain (using uClibc), the executable never tops 400K
w/ my config, which is fairly minimal (all base tools + some archival
+ ash + some network tools, nothing else).  I also think I remember
reading somewhere in the menuconfig descriptions that busybox only
comes in around 4 MB even with all the options selected.  Yet whenever
I compile uClibc seperately (also using the buildroot toolchain w/
uClibc) it always comes to somewhere between 3.5-4.5 MB with a rather
slim config.

Is it just me or does that seem a bit much when compared with the
busybox executable?  I know that busybox isn't statically linking
every function provided by uClibc, but it still seems off.  The uClibc
menuconfig, for example, has a section called "Big and Tall", but even
there the options seem miniscule in comparison with the total compiled
size of the library (e.g., 53 kb regexp support vs. the final
library's size, ~3.5 MB).  Could someone enlighten me?  I'm sure I'm
missing something.

Also, if this behavior is normal, can someone suggest a bare minimum
required config for uClibc to have my fairly minimal busybox run
properly?  Is it possible to get a minimal uClibc so small that the
size of the library + the size of the dynamically linked busybox = the
size of a statically linked busybox, or does uClibc's config mechanism
not provide enough fine-grained control for this?

Thanks,
Ersin


More information about the uClibc mailing list