* elflink.h (elf_gc_mark): Pass in the section whose relocs we are
[deliverable/binutils-gdb.git] / bfd / elf32-sh.c
index 7ff0f8285ac2f6ed0202c381ab0cd1f08db1e727..fdadb6d466ed140d1c508f0a13f2421d57e9f50f 100644 (file)
@@ -78,7 +78,7 @@ static bfd_reloc_status_type sh_elf_reloc_loop
 static boolean sh_elf_create_dynamic_sections
   PARAMS ((bfd *, struct bfd_link_info *));
 static asection * sh_elf_gc_mark_hook
-  PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+  PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
           struct elf_link_hash_entry *, Elf_Internal_Sym *));
 static boolean sh_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -4978,8 +4978,8 @@ sh_elf_get_relocated_section_contents (output_bfd, link_info, link_order,
 }
 
 static asection *
-sh_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd;
+sh_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
      Elf_Internal_Rela *rel;
      struct elf_link_hash_entry *h;
@@ -5009,9 +5009,7 @@ sh_elf_gc_mark_hook (abfd, info, rel, h, sym)
        }
     }
   else
-    {
-      return bfd_section_from_elf_index (abfd, sym->st_shndx);
-    }
+    return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
 
   return NULL;
 }
This page took 0.032837 seconds and 4 git commands to generate.