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: Size of executable???


"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?


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