aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-frv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-frv.c')
-rw-r--r--bfd/elf32-frv.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index cc26b96..8cab505 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -51,7 +51,7 @@ static bfd_reloc_status_type frv_final_link_relocate
static boolean elf32_frv_gc_sweep_hook
PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
static asection * elf32_frv_gc_mark_hook
- PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
+ PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *));
static boolean elf32_frv_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *));
static int elf32_frv_machine PARAMS ((bfd *));
@@ -838,8 +838,8 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
relocation. */
static asection *
-elf32_frv_gc_mark_hook (abfd, info, rel, h, sym)
- bfd * abfd;
+elf32_frv_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;
@@ -869,13 +869,7 @@ elf32_frv_gc_mark_hook (abfd, info, rel, h, sym)
}
}
else
- {
- if (!(elf_bad_symtab (abfd)
- && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
- && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
- && sym->st_shndx != SHN_COMMON))
- return bfd_section_from_elf_index (abfd, sym->st_shndx);
- }
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
return NULL;
}