Set bfd_error to no_symbols if the symbols could not be read.
[deliverable/binutils-gdb.git] / bfd / elf32-openrisc.c
index 34d4d9facde2f530e125265f88e11a01b1d29468..7092110ac911ba2334f849c4d2c9864949264b13 100644 (file)
@@ -41,7 +41,7 @@ static boolean openrisc_elf_gc_sweep_hook
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
            const Elf_Internal_Rela *));
 static asection * openrisc_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 openrisc_elf_check_relocs
   PARAMS ((bfd *, struct bfd_link_info *, asection *,
@@ -289,9 +289,6 @@ openrisc_final_link_relocate (howto, input_bfd, input_section, contents, rel,
 }
 
 /* Relocate an OpenRISC ELF section.
-   There is some attempt to make this function usable for many architectures,
-   both USE_REL and USE_RELA ['twould be nice if such a critter existed],
-   if only to serve as a learning tool.
 
    The RELOCATE_SECTION function is called by the new ELF backend linker
    to handle the relocations for a section.
@@ -468,12 +465,12 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
    relocation.  */
 
 static asection *
-openrisc_elf_gc_mark_hook (abfd, info, rel, h, sym)
-     bfd *abfd ATTRIBUTE_UNUSED;
+openrisc_elf_gc_mark_hook (sec, info, rel, h, sym)
+     asection *sec;
      struct bfd_link_info *info ATTRIBUTE_UNUSED;
-     Elf_Internal_Rela *rel ATTRIBUTE_UNUSED;
-     struct elf_link_hash_entry *h ATTRIBUTE_UNUSED;
-     Elf_Internal_Sym *sym ATTRIBUTE_UNUSED;
+     Elf_Internal_Rela *rel;
+     struct elf_link_hash_entry *h;
+     Elf_Internal_Sym *sym;
 {
   if (h != NULL)
     {
@@ -499,9 +496,7 @@ openrisc_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.025096 seconds and 4 git commands to generate.