From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3691 invoked by alias); 3 Sep 2014 10:21:45 -0000 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 Received: (qmail 3682 invoked by uid 89); 3 Sep 2014 10:21:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 03 Sep 2014 10:21:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s83ALga1022789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Sep 2014 06:21:42 -0400 Received: from zebedee.pink ([10.3.113.10]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s83ALf2W005854; Wed, 3 Sep 2014 06:21:41 -0400 Message-ID: <5406EBB5.7040903@redhat.com> Date: Wed, 03 Sep 2014 10:21:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Melvin Blades , Ian Lance Taylor CC: "gcc-help@gcc.gnu.org" Subject: Re: removing unused functions during final link References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00025.txt.bz2 On 09/03/2014 04:20 AM, Melvin Blades wrote: > Using gcc instead of ld, I was able to get it to strip unused > functions if all the functions in a file are not called. > But I could not get it to strip unused functions if they are in the > same source file as used functions . > > Is there a way to get it strip ALL the unused functions? That should have worked. Please tell us the exact command you used. Andrew.