This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC For Embedded!?
- To: Manfred Hollstein <manfred dot h at gmx dot net>
- Subject: Re: GCC For Embedded!?
- From: CIH <cih at xlinux dot com>
- Date: Tue, 04 Jan 2000 11:12:53 +0800
- CC: mrs at windriver dot com, cih at wahoo dot com dot tw, gcc at gcc dot gnu dot org
- References: <199912282341.PAA00765@kankakee.wrs.com> <14448.43924.819828.84599@saturn.hollstein.net>
**********************************************************
# gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
# ld -v
GNU ld version 2.9.5 (with BFD 2.9.5.0.22)
# gcc -ffunction-sections -fdata-sections -c -Wall test.c
test.c:2: warning: `XYZ' defined but not used
# nm test.o | grep XYZ
00000000 t XYZ
# gcc -ffunction-sections -fdata-sections -Wl,--gc-sections test.o
# nm a.out | grep XYZ
08048404 t XYZ
**********************************************************
Sorry... I try...
But the XYZ still live in the file "a.out"...
Why?
I always spend some time to modify gcc by myself...
Now All not used global function and variables could be cuted.
Now I try to cut local variables not used...
^o^