From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21462 invoked by alias); 25 Jul 2003 14:39:18 -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 21452 invoked from network); 25 Jul 2003 14:39:17 -0000 Received: from unknown (HELO rwcrmhc13.comcast.net) (204.127.198.39) by sources.redhat.com with SMTP; 25 Jul 2003 14:39:17 -0000 Received: from lucon.org ([12.234.88.5]) by comcast.net (rwcrmhc13) with ESMTP id <2003072514391601500qmk83e>; Fri, 25 Jul 2003 14:39:16 +0000 Received: by lucon.org (Postfix, from userid 1000) id 5EED62C4EB; Fri, 25 Jul 2003 14:39:12 +0000 (UTC) Date: Fri, 25 Jul 2003 14:39:00 -0000 From: "H. J. Lu" To: Nick Clifton , binutils@sources.redhat.com Subject: Re: PATCH: Don't use section name to set ELF section data Message-ID: <20030725143912.GB29992@lucon.org> References: <20030614190932.GA5459@lucon.org> <20030725013603.GB17609@lucon.org> <20030725044515.GK27145@bubble.sa.bigpond.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030725044515.GK27145@bubble.sa.bigpond.net.au> User-Agent: Mutt/1.4.1i X-SW-Source: 2003-07/txt/msg00509.txt.bz2 On Fri, Jul 25, 2003 at 02:15:15PM +0930, Alan Modra wrote: > On Thu, Jul 24, 2003 at 06:36:03PM -0700, H. J. Lu wrote: > > * config/obj-elf.h (obj_sec_set_private_data): New. > > > > * subsegs.c (subseg_get): Call obj_sec_set_private_data if it > > is defined. > > This is presumably to tack bfd_elf_section_data onto the standard abs, > com, und and ind sections. Howver, some targets allocate a larger > structure. You should be going via bfd_target._new_section_hook. ie. > BFD_SEND (stdoutput, _new_section_hook, (stdoutput, secptr)) > This will also fix a possible problem with multi-obj gas support, where > obj-elf.h is included but you might be producing COFF output. Done. > > Also, I think the initialization should be done elsewhere, probably > gas/output-file.c:output_file_create. It is a per section initialization. subseg_get seems a logical place. H.J.