How to put glibc-2.2.2 on a diet...

Peter Barada pbarada@mail.wm.sps.mot.com
Fri Jun 22 08:41:00 GMT 2001


>Hmm, my libc.so.2 is 1.1Mb, that for arm-linux. I realise that different
>processors and OS are going to make a difference, but that still
>looks suspiciously big. Is is possible that you are compiling
>debugging symbols in?

Could be, I'm not sure.  How can one configure glibc to build a
library that doesn't have debug, and doesn't bother with the profiled
version?

>Try powerpc-linux-strip hello ?
>
>That said, my experience with glibc is that it's worth sharing
>it if there are more than 3 executables, precisely because the
>start code is so huge (I can't remember what kind of size, but
>200 Kb sounds "normal" (normal in terms of Glibc that is) ).

[/tmp] > echo 'main() { printf("hellow world\n"); }' > hello.c
[/tmp] > powerpc-linux-gcc -static -Wl,-Map,hello.map,--nmagic hello.c -o hello
[/tmp] > powerpc-linux-size hello
   text	   data	    bss	    dec	    hex	filename
 256268	   4124	   3348	 263740	  4063c	hello
[/tmp] > powerpc-linux-strip hello
[/tmp] > powerpc-linux-size hello
   text	   data	    bss	    dec	    hex	filename
 256268	   4124	   3348	 263740	  4063c	hello
[/tmp] > ls -l hello
-rwxrwxr-x    1 pbarada  users      267528 Jun 22 11:38 hello*

stripping it can't make it smaller than the size of the elf header,
text segment and data segment.

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list