This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: C/C++ Binaries double in size for gcc-4.8.5 compared to gcc-4.4.7
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Mason <slash dot tmp at free dot fr>
- Cc: shagun <shagun dot maheshwari at harman dot com>, GCC help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 19 Sep 2017 12:57:54 +0100
- Subject: Re: C/C++ Binaries double in size for gcc-4.8.5 compared to gcc-4.4.7
- Authentication-results: sourceware.org; auth=none
- References: <1505794033611-0.post@n8.nabble.com> <32f9b663-6377-27c3-18ff-e5f7b1152502@free.fr>
On 19 September 2017 at 10:08, Mason wrote:
> On 19/09/2017 06:07, shagun wrote:
>
>> We recently noticed that the size of binaries compiled with the newer GCC
>> (4.8.5) as part of Centos 7 OS is much bigger.
>
> Please note that 4.8 was released in 2013 and is no longer supported
> upstream, as far as I understand.
Correct.
>> Further digging revealed that
>> anything compiled on centos 7 machine has a bigger binary size with at least
>> 20-30% increase and sometimes double or more.
>
> Why is that a problem? Do you see a performance regression?
>
> If the increase comes from the text segment, sometimes bigger code
> runs faster (think unrolling loops). If the increase comes from
> debug segments, does it matter at all? (You can strip unnecessary
> information from the binary.)
Yes, in the absence of any useful information, my guess is the
increase is due to improved debug info in the newer GCC.