This is the mail archive of the gcc-help@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]
Other format: [Raw text]

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


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