PATCH: Don't use section name to set ELF section data

H. J. Lu hjl@lucon.org
Fri Jul 25 14:39:00 GMT 2003


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.



More information about the Binutils mailing list