linking elf notes together on elf32-arm

Nick Clifton nickc@redhat.com
Tue Jul 12 23:01:00 GMT 2011
Hi Mark,

> static bfd_boolean
> elf32_arm_section_flags (flags, hdr)
>       flagword *flags;
>       Elf_Internal_Shdr *hdr;
> {
>    if (hdr->sh_type == SHT_NOTE)
>      *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;

This is a snafu.  It is left over from some old code which used to store 
ARM attributes in a note section.  It is no longer needed, so I am going 
to check in the patch below to remove it.

Cheers
   Nick

bfd/ChangeLog
2011-07-12  Nick Clifton  <nickc@redhat.com>

	* elf32-arm.c (elf32_arm_section_flags): Delete.
	(elf_backend_section_flags): Remove.

Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.272
diff -u -3 -p -r1.272 elf32-arm.c
--- bfd/elf32-arm.c	22 Jun 2011 16:06:00 -0000	1.272
+++ bfd/elf32-arm.c	12 Jul 2011 15:15:51 -0000
@@ -14101,17 +14101,6 @@ elf32_arm_reloc_type_class (const Elf_In
      }
  }

-/* Set the right machine number for an Arm ELF file.  */
-
-static bfd_boolean
-elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
-{
-  if (hdr->sh_type == SHT_NOTE)
-    *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
-
-  return TRUE;
-}
-
  static void
  elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker 
ATTRIBUTE_UNUSED)
  {
@@ -15337,7 +15326,6 @@ const struct elf_size_info elf32_arm_siz
  #define elf_backend_post_process_headers	elf32_arm_post_process_headers
  #define elf_backend_reloc_type_class		elf32_arm_reloc_type_class
  #define elf_backend_object_p			elf32_arm_object_p
-#define elf_backend_section_flags		elf32_arm_section_flags
  #define elf_backend_fake_sections  		elf32_arm_fake_sections
  #define elf_backend_section_from_shdr  		elf32_arm_section_from_shdr
  #define elf_backend_final_write_processing 
elf32_arm_final_write_processing



More information about the Binutils mailing list