From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2514 invoked by alias); 3 Sep 2014 15:13:52 -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 2472 invoked by uid 89); 3 Sep 2014 15:13:50 -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 15:13:48 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s83FDkkO019405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Sep 2014 11:13:46 -0400 Received: from zebedee.pink ([10.3.113.10]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s83FDiAD006516; Wed, 3 Sep 2014 11:13:44 -0400 Message-ID: <54073028.9030601@redhat.com> Date: Wed, 03 Sep 2014 15:13: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 CC: Ian Lance Taylor , "gcc-help@gcc.gnu.org" Subject: Re: removing unused functions during final link References: <5406EBB5.7040903@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-09/txt/msg00027.txt.bz2 On 09/03/2014 04:09 PM, Melvin Blades wrote: > The resulting executable contains the texts strings and function names > from both functions in show.c and neither function of show2.c My > usage of -fdata-section -ffunction-section and -gc-sections prevents > the functions in show2.c from being linked in , but not the unused > functions in show.c Something must be referring to them; they must be reachable. That or there's a bug. There's no way for anyone to know without seeing code. Andrew.