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]

Re: Help me please !!


> 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.


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