[RFA] Linker script extension SECTION_FLAGS
Tristan Gingold
gingold@adacore.com
Thu May 19 07:44:00 GMT 2011
On May 18, 2011, at 9:32 PM, Catherine Moore wrote:
> 2011-05-18 Catherine Moore <clm@codesourcery.com>
> bfd/
> 2011-05-18 Catherine Moore <clm@codesourcery.com>
>
> * bfd-in2.h: Regenerated.
> * bfd.c (bfd_lookup_section_flags): New definition.
> * binary.c (binary_bfd_lookup_section_flags): New definition.
> * coff-rs6000.c (rs6000coff_vec): Include
> bfd_generic_lookup_section_flags.
> (pmac_xcoff_vec): Likewise.
> * coffcode.h (coff_bfd_lookup_section_flags): New definition.
> * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
> (bfd_elf_lookup_section_flags): Declare.
> * elflink.c (bfd_elf_lookup_section_flags): New function.
> * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
> (elf_backend_lookup_section_flags_hook): Define.
> (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
> * ieee.c (ieee_bfd_lookup_section_flags): New define.
> * ihex.c (ihex_bfd_lookup_section_flags): New define.
> * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
> (bfd_generic_lookup_section_flags): Declare.
> * libbfd.h: Regenerated.
> * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
> * mmo.c (mmo_fd_lookup_section_flags): New definition.
Typo in the code too: mmo_bfd_...
Also, I am not sure that you really need to have elf_backend_lookup_section_flags_hook.
In your patch, bfd_elf_lookup_section_flags is simply a wrapper.
Each ELF target can simply define its own XX_bfd_lookup_section_flags.
Finally, in the grammar of SECTION_FLAGS, I would replace the comma with a '&' to clarify
the fact this is a conjunction.
Thank you for working on that.
Tristan.
More information about the Binutils
mailing list