On 1/23/12 1:12 AM, Jonathan Andrews wrote: > I needed a statically linked bash for testing an arm board. I did not > expect it to be nearly 3MB though ! It surprises me that a statically > linked bash is bigger than the entire busybox binary i've compiled, or > my kernel image for that matter. Is this bloat gcc, some failing of the > linker or bash itself?
That's probably the size of the C library on your machine. The only difference between a static bash and a `normal' bash is that the system libraries are linked in instead of being dynamically linked at run time. I built a minimal bash (--enable-minimal-config) on my machine (Mac OS X, where static linking isn't possible), and it ended up being about half as big as a bash-4.2.20 build. I had to fix a few things to do it. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/