This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help me please !!
- To: linuxvn at saigonnet dot vn
- Subject: Re: Help me please !!
- From: pkurpis at keck dot hawaii dot edu (Peter Kurpis)
- Date: Thu, 19 Apr 2001 08:13:07 -1000 (HST)
- Cc: gcc-help at gcc dot gnu dot org
> 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.