From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20222 invoked by alias); 16 May 2006 15:02:06 -0000 Received: (qmail 20202 invoked by uid 22791); 16 May 2006 15:02:04 -0000 X-Spam-Check-By: sourceware.org Received: from CPE-144-136-172-108.sa.bigpond.net.au (HELO grove.modra.org) (144.136.172.108) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 May 2006 15:01:49 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id E4C3F1E1225; Wed, 17 May 2006 00:31:45 +0930 (CST) Date: Tue, 16 May 2006 22:39:00 -0000 From: Alan Modra To: Etienne Lorrain Cc: binutils@sourceware.org Subject: Re: `.sym' referenced in section `reloc_sym' of file.o: defined in discarded section `.text.sym' of file.o Message-ID: <20060516150145.GI19700@bubble.grove.modra.org> Mail-Followup-To: Etienne Lorrain , binutils@sourceware.org References: <20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060516113425.43587.qmail@web26913.mail.ukl.yahoo.com> User-Agent: Mutt/1.4i X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00274.txt.bz2 On Tue, May 16, 2006 at 01:34:25PM +0200, Etienne Lorrain wrote: > My problem is when the function (for instance) linux_set_params is not used > at all in the link process, and is discarded because I am using GCC -ffunction-sections > and LD --gc-sections, it is still referenced in ".section reloc_paramcode_section" What is special about reloc_paramcode_section? ie. How are you managing to confuse the linker into thinking the reference in that section is not a normal use, which should result in linux_set_params being kept? Do you have a small self-contained testcase? -- Alan Modra IBM OzLabs - Linux Technology Centre