This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Size of executable???
- To: help-gcc at gnu dot org
- Subject: Re: Size of executable???
- From: Matthew Majka <mmajka at cs5 dot dasd dot honeywell dot com>
- Date: Mon, 04 Oct 1999 11:29:33 -0600
- Newsgroups: gnu.gcc.help
- Organization: Honeywell, Inc. (Defense Avionics Systems)
- References: <37F818B9.53B85D3F@javanet.com>
- Xref: wodc7nx0 gnu.gcc.help:1268
"Andrew L. Blais" wrote:
>
> I'm working with RedHat 6.0, and I've dowloaded, configured, built, and
> installed gcc-2.95.1. The relevant gcc and g++ commands are put in
> /usr/local/bin. I've made symbolic links to the 2.95.1 gcc and g++ in
> /usr/bin. These are GCC and G++. When I compile a simple c++ program
> with my old g++ ( the version that came with RH6.0 -- 2.95 ) it yields
> an executable of about 20k, but when I compile the same program with G++
> ( version 2.95.1 ) it yields an executable of about 330k. Same flags,
> and so on. This happens with every program. 2.95 yields a small program,
> and 2.95.1 yields a large program. This also happens when I try:
> /usr/local/bin/g++ -g -Wall hello.cpp -o hello. What is happening here?
>
> >>> ALB
Compare the output of 'size hello' and see if the difference is still huge. Is
one doing a static link and the other a shared (normal) link?