From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31425 invoked by alias); 27 Aug 2009 14:06:12 -0000 Received: (qmail 31349 invoked by uid 22791); 27 Aug 2009 14:06:10 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from tx2ehsobe002.messaging.microsoft.com (HELO TX2EHSOBE003.bigfish.com) (65.55.88.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Aug 2009 14:06:06 +0000 Received: from mail152-tx2-R.bigfish.com (10.9.14.252) by TX2EHSOBE003.bigfish.com (10.9.40.23) with Microsoft SMTP Server id 8.1.340.0; Thu, 27 Aug 2009 14:06:03 +0000 Received: from mail152-tx2 (localhost.localdomain [127.0.0.1]) by mail152-tx2-R.bigfish.com (Postfix) with ESMTP id AB235418874 for ; Thu, 27 Aug 2009 14:06:03 +0000 (UTC) X-SpamScore: 12 X-BigFish: VPS12(z24c7r6f5izzz1202hzzz32i6bh63h) X-Spam-TCS-SCL: 2:0 X-FB-SS: 5, Received: by mail152-tx2 (MessageSwitch) id 1251381956801292_31977; Thu, 27 Aug 2009 14:05:56 +0000 (UCT) Received: from Kcinpunhjhc01.kpit.com (unknown [203.197.93.240]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail152-tx2.bigfish.com (Postfix) with ESMTP id 77939B00062 for ; Thu, 27 Aug 2009 14:05:54 +0000 (UTC) Received: from Kcinpunhjcms01.kpit.com ([172.10.16.121]) by Kcinpunhjhc01.kpit.com ([172.10.16.123]) with mapi; Thu, 27 Aug 2009 19:35:49 +0530 From: Suma Sharma To: "gcc-help@gcc.gnu.org" Date: Thu, 27 Aug 2009 20:10:00 -0000 Subject: Increase in code size for c++ applications using GCC-4.4.1 Message-ID: <371569CBCFB2E745B891DBB88B2DFDDD16FB8528BD@KCINPUNHJCMS01.kpit.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-08/txt/msg00299.txt.bz2 Hi, I have built two toolchains for the H8 target.=20 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 in= creased by approximately 66% as compared to that of H8-Toolchain-II. In order to narrow down my focus of investigation, I built another toolchai= n 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 toolchai= ns for SH as well. The SH toolchain with GCC-4.4.1 showed similar behaviour as the H8-Toolchai= n-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. Th= e "-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 increa= se 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