From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11769 invoked by alias); 13 Oct 2006 01:38:17 -0000 Received: (qmail 11759 invoked by uid 22791); 13 Oct 2006 01:38:16 -0000 X-Spam-Check-By: sourceware.org Received: from omta03ps.mx.bigpond.com (HELO omta03ps.mx.bigpond.com) (144.140.82.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 13 Oct 2006 01:38:09 +0000 Received: from bubble.grove.modra.org ([60.226.236.165]) by omta03ps.mx.bigpond.com with ESMTP id <20061013013805.UBM11173.omta03ps.mx.bigpond.com@bubble.grove.modra.org>; Fri, 13 Oct 2006 01:38:05 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id CBF242B5FD0; Fri, 13 Oct 2006 11:08:52 +0930 (CST) Date: Fri, 13 Oct 2006 11:26:00 -0000 From: Alan Modra To: Jakub Jelinek Cc: "H. J. Lu" , Paul Brook , binutils@sourceware.org, Paul Koning , vgoyal@redhat.com, drow@false.org, binutils@sources.redhat.com Subject: Re: Linker Bug or Design Intent (Absolute symbols in zero sized sections) Message-ID: <20061013013852.GB20843@bubble.grove.modra.org> Mail-Followup-To: Jakub Jelinek , "H. J. Lu" , Paul Brook , binutils@sourceware.org, Paul Koning , vgoyal@redhat.com, drow@false.org, binutils@sources.redhat.com References: <17689.23227.571136.559871@gargle.gargle.HOWL> <20060926232851.GB1534@bubble.grove.modra.org> <200609281742.31472.paul@codesourcery.com> <20060928165251.GA20383@lucon.org> <20061010163423.GJ4556@sunsite.mff.cuni.cz> <20061010231922.GK4556@sunsite.mff.cuni.cz> <20061011035305.GA19554@bubble.grove.modra.org> <20061011071125.GL4556@sunsite.mff.cuni.cz> <20061012034341.GA20843@bubble.grove.modra.org> <20061012143409.GI20982@devserv.devel.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061012143409.GI20982@devserv.devel.redhat.com> User-Agent: Mutt/1.5.9i 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-10/txt/msg00094.txt.bz2 Message-ID: <20061013112600.N1E0gjsZZorneQUdbH2MeGaTr50UvHnKXEgr4-5ZLtE@z> On Thu, Oct 12, 2006 at 10:34:09AM -0400, Jakub Jelinek wrote: > On Thu, Oct 12, 2006 at 01:13:41PM +0930, Alan Modra wrote: > > > Against emitting empty sections speaks both that it is a wasted space > > > in section header table/.shstrtab, but more importantly that empty > > > sections are an endless source of bugs > > > > Agreed. > > > > If we are to remove them, then > > a) Detecting a symbol assignment in a linker script should result in the > > section alignment and vma being honoured. > > Not sure what are we doing ATM here. The wrong thing.. > > b) All the ELF backends will need changes so that removed output section > > syms are never used when emitting relocs. At the same time, we may > > as well just use one section sym for all relocs (or two for targets > > that might want to relocate the data segment separately from the text > > segment). > > Sure. > > > c) _bfd_fix_excluded_sec_syms should be changed to not create absolute > > syms. > > And instead have the nearest section in the same loadable segment in > st_shndx? Something like that. I figured on just using the closest preceding section. BTW, I started throwing a patch together to do (b). -- Alan Modra IBM OzLabs - Linux Technology Centre