[RFC/PATCH] Fix `bfd_{get,set}_*' macros
nick clifton
nickc@redhat.com
Wed May 16 18:28:00 GMT 2012
Hi Sergio,
> 2012-05-04 Sergio Durigan Junior<sergiodj@redhat.com>
>
> * bfd-in2.h (bfd_get_section_name, bfd_get_section_vma,
> bfd_get_section_lma, bfd_get_section_alignment,
> bfd_get_section_flags,
> bfd_get_section_userdata): Rewrite macros in order to use the
> `bfd' argument.
> * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
> as the first argument for `bfd_get_section_alignment'.
> * elf32-arm.c (create_ifunc_sections): Likewise, for
> `bfd_set_section_alignment'.
> * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
> `bfd_get_section_name'.
> * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
> * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
> (ppc_elf_relocate_section): Likewise.
> * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
> `bfd_get_section_vma'.
> * elf64-ppc.c (create_linkage_sections): Likewise, for
> `bfd_set_section_alignment'.
I have applied this patch. There were however a few problems with it:
* You modified bfd-in2.h, an auto-generated file, but not bfd-in.h,
the file from which it is generated.
* You missed a use of bfd_get_section_name() in bfd/elf32-ppc.c.
* You missed a use of bfd_get_section_vma() in gas/config/tc-alpha.c.
* You missed two uses of bfd_get_section_name() in
ld/emultempl/m68hc1xelf.em.
These problems have been fixed. For future reference I recommend
building a toolchain configured as "--enable-64-bit-bfd
--enable-targets=all" in order to catch problems like these.
Cheers
Nick
More information about the Binutils
mailing list