PATCH: Don't use section name to set ELF section data
Alan Modra
amodra@bigpond.net.au
Fri Jul 25 04:48:00 GMT 2003
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
More information about the Binutils
mailing list