diff options
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r-- | bfd/elf32-v850.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 1b288e4..8a8179f 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -1711,50 +1711,22 @@ v850_elf_relocate_section (bfd *output_bfd, return TRUE; } -static bfd_boolean -v850_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) -{ - /* No got and plt entries for v850-elf. */ - return TRUE; -} - static asection * v850_elf_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)) + switch (ELF32_R_TYPE (rel->r_info)) { case R_V850_GNU_VTINHERIT: case R_V850_GNU_VTENTRY: - break; - - default: - switch (h->root.type) - { - 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; - - default: - break; - } - } - } - else - return bfd_section_from_elf_index (sec->owner, sym->st_shndx); + return NULL; + } - return NULL; + return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); } /* Set the right machine number. */ @@ -3078,7 +3050,6 @@ static const struct bfd_elf_special_section v850_elf_special_sections[] = #define elf_backend_section_from_shdr v850_elf_section_from_shdr #define elf_backend_fake_sections v850_elf_fake_sections #define elf_backend_gc_mark_hook v850_elf_gc_mark_hook -#define elf_backend_gc_sweep_hook v850_elf_gc_sweep_hook #define elf_backend_special_sections v850_elf_special_sections #define elf_backend_can_gc_sections 1 |