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]
Other format: [Raw text]

Re: incredible increase in executable size (AIX)


>>>>> Joerg Richter writes:

Joerg> I just installed GCC 3.3.2 on Linux and AIX. But I must see that the
Joerg> executable size on AIX is between 10 and 100 times bigger compared to GCC
Joerg> 3.2.1.

Joerg> /tools/pkg/gcc/3.2.1/bin/g++ foo.cc -o foo.321
Joerg> /tools/pkg/gcc/3.3.2/bin/g++ foo.cc -o foo.332

Joerg> ls -l foo.321 foo.332
Joerg> size -df foo.321 foo.332

Joerg> #### end ####

Joerg> The output of runtest on AIX is:

Joerg> + /tools/pkg/gcc/3.2.1/bin/g++ -v
Joerg> Reading specs from
Joerg> /tools/pkg/gcc/3.2.1/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.2.1/specs
Joerg> Configured with: configure --prefix=/tools/pkg/gcc/3.2.1 --with-ld=/bin/ld
Joerg> --with-as=/bin/as --enable-languages=c,c++
Joerg> Thread model: aix
Joerg> gcc version 3.2.1
Joerg> + /tools/pkg/gcc/3.3.2/bin/g++ -v
Joerg> Reading specs from
Joerg> /tools/pkg/gcc/3.3.2/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/specs
Joerg> Configured with: ../gcc-3.3.2/configure --prefix=/tools/pkg/gcc/3.3.2
Joerg> --with-ld=/bin/ld --with-as=/bin/as --enable-languages=c,c++,f77
Joerg> Thread model: aix
Joerg> gcc version 3.3.2
Joerg> + /tools/pkg/gcc/3.2.1/bin/g++ foo.cc -o foo.321
Joerg> + /tools/pkg/gcc/3.3.2/bin/g++ foo.cc -o foo.332
Joerg> + ls -l foo.321 foo.332
Joerg> -rwxrwxr-x   1 jrichter jrichter      18557 Dec 05 10:06 foo.321
Joerg> -rwxrwxr-x   1 jrichter jrichter    3471941 Dec 05 10:06 foo.332
Joerg> + size -df foo.321 foo.332
Joerg> foo.321: 1236(.text) + 644(.data) + 32(.bss) + 6456(.loader) = 8368
Joerg> foo.332: 243023(.text) + 58057(.data) + 40(.bss) + 100168(.loader) +
Joerg> 1170278(.debug) = 1571566

Joerg> Ok. Somehow 332 generates debug information and 321 not. But look at the
Joerg> difference in the .text and .data size.

	I have tried your testcase and cannot replicate this problem. 

	I do not think you should just dismiss the debugging information.
You did not compile or link with debugging enabled. I think if you find
where debugging is being enabled behind your back that you will find 
what other option is being enabled that increases the executable size.

David


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