Fix excessive memory allocation attempts and possible integer overfloaws when attempt...
[deliverable/binutils-gdb.git] / bfd / elf32-microblaze.c
index 494b6368c95dcb31f2b9151bc80853b8a57a85f9..a54044fdb3c45327ddb4792223bb37a689c8f11b 100644 (file)
@@ -2224,17 +2224,6 @@ microblaze_elf_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
-/* Update the got entry reference counts for the section being removed.  */
-
-static bfd_boolean
-microblaze_elf_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
-                             struct bfd_link_info * info ATTRIBUTE_UNUSED,
-                             asection * sec ATTRIBUTE_UNUSED,
-                             const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
-{
-  return TRUE;
-}
-
 /* PIC support.  */
 
 #define PLT_ENTRY_SIZE 16
@@ -2318,6 +2307,9 @@ microblaze_elf_check_relocs (bfd * abfd,
       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;
 
          /* PR15323, ref flags aren't set for references in the same
             object.  */
@@ -3465,7 +3457,6 @@ microblaze_elf_add_symbol_hook (bfd *abfd,
 #define bfd_elf32_bfd_reloc_name_lookup                microblaze_elf_reloc_name_lookup
 
 #define elf_backend_gc_mark_hook               microblaze_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook              microblaze_elf_gc_sweep_hook
 #define elf_backend_check_relocs                microblaze_elf_check_relocs
 #define elf_backend_copy_indirect_symbol        microblaze_elf_copy_indirect_symbol
 #define bfd_elf32_bfd_link_hash_table_create    microblaze_elf_link_hash_table_create
This page took 0.022902 seconds and 4 git commands to generate.