From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28160 invoked by alias); 12 Oct 2006 14:37:31 -0000 Received: (qmail 28147 invoked by uid 22791); 12 Oct 2006 14:37:30 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 12 Oct 2006 14:37:27 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k9CEZAaA019436; Thu, 12 Oct 2006 10:35:10 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k9CEZAgb007868; Thu, 12 Oct 2006 10:35:10 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k9CEYAsV005266; Thu, 12 Oct 2006 10:34:10 -0400 Received: (from jakub@localhost) by devserv.devel.redhat.com (8.12.11.20060308/8.12.11/Submit) id k9CEY9er005264; Thu, 12 Oct 2006 10:34:09 -0400 Date: Fri, 13 Oct 2006 10:58:00 -0000 From: Jakub Jelinek To: "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: <20061012143409.GI20982@devserv.devel.redhat.com> Reply-To: Jakub Jelinek References: <4519350D.2090208@redhat.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061012034341.GA20843@bubble.grove.modra.org> User-Agent: Mutt/1.4.1i 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/msg00090.txt.bz2 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. > 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? Jakub