How to put glibc-2.2.2 on a diet...
bgat@billgatliff.com
bgat@billgatliff.com
Fri Jun 22 08:39:00 GMT 2001
Peter:
There is/was a project out there somewhere called sglibc, which is
patches against glibc to shrink it down.
I have to warn you, though: I looked into sglibc a few months ago, and
the project was still seeking direction and leadership. On top of
that, the main developer seemed to be a quite cranky individual whose
only goal is a one-disk linux disto. Embedded isn't his thing.
That said, you may find that some of sglibc's techniques are useful.
Also, newlib-1.9.0 can do some linux libc stuff now, but the precise
list of what it offers escapes me. Try their site at
http://sources.redhat.com/newlib . Maybe there's enough of what you
need there.
HTH,
b.g.
On Fri, Jun 22, 2001 at 11:15:59AM -0400, Peter Barada wrote:
>
> 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
>
--
Bill Gatliff
bgat@billgatliff.com
------
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