This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: GCC For Embedded!?


**********************************************************
# 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^



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