This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



Now for something completely different.

I'm putting together my embedded Linux system, and I want to
statically link my applications since I only have about 10 of them in
total (init, expand, mount, ifconfig, route, etc...), as well as
libc.a by itself is 10+Mb.

So when I statically link the hellow world application, here's what I get:

[/tmp] > echo 'main() { printf("hello world\n"); }' > hello.c
[/tmp] > powerpc-linux-gcc -static -Wl,-Map,hello.map hello.c -o hello
[/tmp] > powerpc-linux-size hello
   text	   data	    bss	    dec	    hex	filename
 256252	   4124	   3348	 263724	  4062c	hello

Note that the text segment is a quarter of a Meg!!!  And that's after I
hacked out 100Kb of dcgettext() stuff.

Does anyone have an idea of how I can configure glibc to not define
USE_WIDE_CHAR, not to call dcgettext and friends to look up strings in
message files, etc so I have a much, much smaller library footprint.

Thanks in advance,

-- 
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]