This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Giant executables.. what am I doing wrong?
- From: Michiel Buddingh' <ajuin+mail at stack dot nl>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 15 Oct 2002 01:49:39 +0200
- Subject: Giant executables.. what am I doing wrong?
I'm currently trying to write a program for a linux system with limited
memory, and as such I'd like gcc to generate small, statically linked
executables.
However, if I compile even a simple program like:
int main() { write(2,"Hello world.\n", 13); return 0; }
with the --static option, then strip it with "--strip-all" I get a
program worth 332 kB(!).
Needless to say, this is not exactly what I want.
I have tried both gcc 2.95 and gcc 3.2, but the results differ only by
a few bytes.
Am I missing something really obvious here?
--
-- Michiel