summaryrefslogtreecommitdiff
path: root/bfd/elf32-cr16.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-01-08 05:55:10 +0000
committerAlan Modra <amodra@gmail.com>2010-01-08 05:55:10 +0000
commitfb34365b48184914756d2bf103c60c4a7769ff43 (patch)
tree0895233389a4dcdbb043399efb8f3cbf62e832df /bfd/elf32-cr16.c
parentd023c380db01abd7f6f2a53edecca09488b53982 (diff)
downloadbinutils-gdb-fb34365b48184914756d2bf103c60c4a7769ff43.tar.gz
PR ld/11133
* elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook. * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise. * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
Diffstat (limited to 'bfd/elf32-cr16.c')
-rw-r--r--bfd/elf32-cr16.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 9a4e2a9baee..84d95509268 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -1,5 +1,5 @@
/* BFD back-end for National Semiconductor's CR16 ELF
- Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Written by M R Swami Reddy.
This file is part of BFD, the Binary File Descriptor library.
@@ -2287,26 +2287,12 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec,
static asection *
elf32_cr16_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
- if (h == NULL)
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- 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:
- return NULL;
- }
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */