aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-bfin.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-bfin.c')
-rw-r--r--bfd/elf32-bfin.c48
1 files changed, 8 insertions, 40 deletions
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 6ceaeb0..9ceeade 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -3106,51 +3106,20 @@ bfin_relocate_section (bfd * output_bfd,
static asection *
bfin_gc_mark_hook (asection * sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela * rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym * sym)
{
if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
-
- case R_BFIN_GNU_VTINHERIT:
- case R_BFIN_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- default:
- break;
-
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- return NULL;
-}
-
-
-/* Update the got entry reference counts for the section being removed. */
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_BFIN_GNU_VTINHERIT:
+ case R_BFIN_GNU_VTENTRY:
+ return NULL;
+ }
-static bfd_boolean
-bfinfdpic_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;
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -5564,7 +5533,6 @@ error_return:
#define elf32_bed elf32_bfinfdpic_bed
#undef elf_backend_gc_sweep_hook
-#define elf_backend_gc_sweep_hook bfinfdpic_gc_sweep_hook
#undef elf_backend_got_header_size
#define elf_backend_got_header_size 0