This is the mail archive of the gcc@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: Increased binary size in RedHat 7 using gcc



>From: H . J . Lu [mailto:hjl@valinux.com]
>Sent: 15 February 2001 06:35

>On Wed, Feb 14, 2001 at 10:36:08PM -0800, Pawan Singh wrote:
>> So why does linking with a different library i.e. glibc increase the
>> "HelloWorld" program code size? Can someone explain this? 
>How much of the
>> code and data in a program like "HelloWorld" are from "glibc".
>> 

>"HelloWorld" is a small program. From what I can tell, the main
>size increase comes from crt*.o, which are necessary.

  It all depends whether the C library is being dynamically or statically
linked, surely?

  If it's static, then helloworld will pull in printf, which will pull in
stdout and fprintf, which will pull in the entire libio, ctype.. virtually
the entire thing.

  crt*.o tends to be quite small by comparison.

  Perhaps what changed between the two versions is indeed whether libgcc is
dynamically or statically linked?

  Or perhaps I'm completely wrong.  It wouldn't be the first time...

        DaveK
-- 
we are not seats or eyeballs or end users or consumers.
we are human beings - and our reach exceeds your grasp.
                    deal with it.                      - cluetrain.org 


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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