This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Don't use section name to set ELF section data
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Nick Clifton <nickc at redhat dot com>, binutils at sources dot redhat dot com
- Date: Fri, 25 Jul 2003 14:15:15 +0930
- Subject: Re: PATCH: Don't use section name to set ELF section data
- References: <20030614190932.GA5459@lucon.org> <m3y901rluw.fsf@redhat.com><20030725013603.GB17609@lucon.org>
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.
Also, I think the initialization should be done elsewhere, probably
gas/output-file.c:output_file_create.
--
Alan Modra
IBM OzLabs - Linux Technology Centre