This is the mail archive of the binutils@sourceware.org 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]

PATCH, COMMIT: PR 12161


Hi Guys,

  I am checking in the patch for PR 12161, which fixes a problem
  handling files with bad relocations in the AVR port of BFD.

Cheers
  Nick

bfd/ChangeLog
2010-11-17  Nick Clifton  <nickc@redhat.com>

	PR ld/12161
	* elf32-avr.c (elf32_avr_check_relocs): Delete.
	(elf_backend_check_relocs): Delete.

Index: elf32-avr.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-avr.c,v
retrieving revision 1.48
diff -u -3 -p -r1.48 elf32-avr.c
--- elf32-avr.c	25 Oct 2010 15:54:13 -0000	1.48
+++ elf32-avr.c	17 Nov 2010 10:52:05 -0000
@@ -734,48 +734,6 @@ avr_info_to_howto_rela (bfd *abfd ATTRIB
   cache_ptr->howto = &elf_avr_howto_table[r_type];
 }
 
-/* Look through the relocs for a section during the first phase.
-   Since we don't do .gots or .plts, we just need to consider the
-   virtual table relocs for gc.  */
-
-static bfd_boolean
-elf32_avr_check_relocs (bfd *abfd,
-			struct bfd_link_info *info,
-			asection *sec,
-			const Elf_Internal_Rela *relocs)
-{
-  Elf_Internal_Shdr *symtab_hdr;
-  struct elf_link_hash_entry **sym_hashes;
-  const Elf_Internal_Rela *rel;
-  const Elf_Internal_Rela *rel_end;
-
-  if (info->relocatable)
-    return TRUE;
-
-  symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
-  sym_hashes = elf_sym_hashes (abfd);
-
-  rel_end = relocs + sec->reloc_count;
-  for (rel = relocs; rel < rel_end; rel++)
-    {
-      struct elf_link_hash_entry *h;
-      unsigned long r_symndx;
-
-      r_symndx = ELF32_R_SYM (rel->r_info);
-      if (r_symndx < symtab_hdr->sh_info)
-        h = NULL;
-      else
-	{
-	  h = sym_hashes[r_symndx - symtab_hdr->sh_info];
-	  while (h->root.type == bfd_link_hash_indirect
-		 || h->root.type == bfd_link_hash_warning)
-	    h = (struct elf_link_hash_entry *) h->root.u.i.link;
-	}
-    }
-
-  return TRUE;
-}
-
 static bfd_boolean
 avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation)
 {
@@ -2998,7 +2956,6 @@ elf32_avr_build_stubs (struct bfd_link_i
 #define elf_info_to_howto	             avr_info_to_howto_rela
 #define elf_info_to_howto_rel	             NULL
 #define elf_backend_relocate_section         elf32_avr_relocate_section
-#define elf_backend_check_relocs             elf32_avr_check_relocs
 #define elf_backend_can_gc_sections          1
 #define elf_backend_rela_normal		     1
 #define elf_backend_final_write_processing \


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