From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7805 invoked by alias); 22 Mar 2005 05:03:34 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 7602 invoked from network); 22 Mar 2005 05:03:16 -0000 Received: from unknown (HELO omta05ps.mx.bigpond.com) (144.140.83.195) by sourceware.org with SMTP; 22 Mar 2005 05:03:16 -0000 Received: from modra.org ([144.136.221.26]) by omta05ps.mx.bigpond.com with ESMTP id <20050322050314.HWFS20723.omta05ps.mx.bigpond.com@modra.org>; Tue, 22 Mar 2005 05:03:14 +0000 Received: by bubble.modra.org (Postfix, from userid 500) id 320DE1A0AFA; Tue, 22 Mar 2005 15:33:14 +1030 (CST) Date: Tue, 22 Mar 2005 12:06:00 -0000 From: Alan Modra To: "H. J. Lu" Cc: binutils@sources.redhat.com Subject: Re: Yet another unnecessary powerpc section Message-ID: <20050322050314.GE27445@bubble.modra.org> Mail-Followup-To: "H. J. Lu" , binutils@sources.redhat.com References: <20050321140003.GK1260@bubble.modra.org> <20050322031617.GD27445@bubble.modra.org> <20050322041855.GA22732@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050322041855.GA22732@lucon.org> User-Agent: Mutt/1.4i X-SW-Source: 2005-03/txt/msg00651.txt.bz2 On Mon, Mar 21, 2005 at 08:18:55PM -0800, H. J. Lu wrote: > On Tue, Mar 22, 2005 at 01:46:17PM +1030, Alan Modra wrote: > > On Tue, Mar 22, 2005 at 12:30:03AM +1030, Alan Modra wrote: > > > * scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms. > > > > Sigh. It appears my search through source wasn't comprehensive enough. > > libgloss uses __sbss_start and __sbss_end. > > > > * elf32-ppc.c (set_linker_sym): New function, extracted from.. > > (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss > > start and end syms. > > > > +/* Set _SDA_BASE_, _SDA2_BASE, and sbss start and end syms. They are > > + set here rather than via PROVIDE in the default linker script, > > + because using PROVIDE inside an output section statement results in > > + unnecessary output sections. Using PROVIDE outside an output section > > + statement runs the risk of section alignment affecting where the > > + section starts. */ > > > > We had the same problem with __XXX_array_start/__XXX_array_end. I am > running into the same problem for a different issue. Can we can make > this a generic ELF function: > > void bfd_elf_provide_symbol (struct bfd_link_info *, > const char *sym_name, > asection *sec, > bfd_vma val); > > It will define a hidden data symbol NAME defined in SEC with value VAL > if it is undefined. If you need it, go ahead and steal it. :) The function probably ought to start with '_' to indicate that it's not part of the public bfd interface. -- Alan Modra IBM OzLabs - Linux Technology Centre