This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C/C++ Binaries double in size for gcc-4.8.5 compared to gcc-4.4.7
- From: shagun <shagun dot maheshwari at harman dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 18 Sep 2017 23:07:13 -0500 (CDT)
- Subject: C/C++ Binaries double in size for gcc-4.8.5 compared to gcc-4.4.7
- Authentication-results: sourceware.org; auth=none
Hi,
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. 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.
Eg: I compiled a simple 'hello world' C program on both Centos 6 and Centos
7. Here are their sizes:
Centos 6: 6465 bytes
Centos 7: 8512 bytes.
All our C/C++ based application binary sizes have increased which has caused
the size of the ISO to also blow up.
Please let us know more details/information on why do we see this increase
and how to mitigate the same. The GCC versions in centos6 is 4.4.7 and in
centos7 is 4.8.5.
Regards,
Shagun
--
Sent from: http://gcc.1065356.n8.nabble.com/gcc-Help-f629689.html