On Thursday 14 May 2009 07:19:59 Sourav Chakraborty wrote: > Hello List, > We are basically requiring a small footprint dropbear server binary for x86 > linux and have hence followed the steps-- 1. have downloaded dropbear-0.52 > source code in tar.gz format. > 2. ./configure --disable-zlib --disable-syslog > 3. modified the Makefile to append-- > -ffunction-sections -fdata-sections -DLTC_NO_BSWAP with CFLAGS and > -Wl,--gc-sections with LDFLAGS4.modified options.h file --(attached)5. make > STATIC=1 MULTI=1 PROGRAMS=dropbear 6. strip dropbear > > We have done the above on x86 machine having FC3 linux with gcc 3.4.2 > 20041017. > > The dropbear binary generated after the "strip" is of size 549120 bytes i.e > ~549kB.But from the msg archive I could see that -- "A small memory > footprint suitable for
Build it statically linked against uClibc. You can grab the appropriate cross compiler toolchain (prebuilt) from http://impactlinux.com/fwl/downloads/binaries/cross-compiler/host-i686/cross-compiler-i686.tar.bz2 (If you need an arm target or such, there are other cross compilers in the same directory, all of which link against uClibc 0.9.30.1.) > > memory-constrained environments - Dropbear can compile > > to a 110kB statically linked binary with uClibc (and > > only minimal options selected)." > > Of course I am not using uClibc,but is that the reason for such a > difference in the footprint?What else can I do to decreasethe footprint to > a size of 110kB as mentioned?Please reply asap as this is kind of urgent > :-)Thanks and RegardsSourav Considering that statically linking "hello world" against glibc gives you a 400k executable, I'd say that's the problem. Rob -- Latency is more important than throughput. It's that simple. - Linus Torvalds