Increase in code size for c++ applications using GCC-4.4.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I have built two toolchains for the H8 target. 
H8-Toolchain-I was built using the following source versions:
GCC-4.4.1
Newlib-1.17.0

H8-Toolchain-II was built using the following:
GCC-4.3.3
Newlib-1.16.0

While doing benchmarking of the above two toolchains (for C++ application) it was observed that the size of the text section for H8-Toolchain-I had increased by approximately 66% as compared to that of H8-Toolchain-II.

In order to narrow down my focus of investigation, I built another toolchain with the following source versions:
GCC-4.4.1
Newlib-1.16.0
This too exhibited behaviour similar to H8-Toolchain-I.

Therefore, it seems that this issue is mainly due to GCC.

In order to check if it was specific to H8 target, I built similar toolchains for SH as well.
The SH toolchain with GCC-4.4.1 showed similar behaviour as the H8-Toolchain-I.

I tried compiling the test case with different optimization options ("O1", "O2", "O3" and "Os") and also with the option "--gc-sections" to linker. The "-gc-sections" option did help but not to a great extent.

Could anyone point out as to what changes in GCC are leading to such increase in code size?
Also could anyone suggest if there are any options that could be enabled / disabled in GCC-4.4.1 in order to reduce code size?

Any help will be highly appreciated.

Regards,
Suma Sharma




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux