Help me please !!

Peter Kurpis pkurpis@keck.hawaii.edu
Thu Apr 19 11:13:00 GMT 2001


> gcc -static file.c -o file

> But It's too big !!. Very big !! ~~ 900k

Try using  size file  to get a sense of what's
taking up the space.  If it's unwanted debug
information,  strip file  will help.  But I 
doubt that's the problem.

Does anyone know whether the linker-loader
attaches an entire library to the executable,
or extracts just the required modules?  Seems
to me that 900k could be the size of  libc.a ,
which is the only lib you're linking to in 
this case (besides gcc housekeeping libs, if
any)!

Is there an option to the linker-loader that
says "only attach the called modules and their
dependencies"?

P.S. I don't have a Linux system available to
check the assumption.



More information about the Gcc-help mailing list