This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]