diff options
author | Alan Modra <amodra@gmail.com> | 2010-01-08 05:55:10 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-01-08 05:55:10 +0000 |
commit | fb34365b48184914756d2bf103c60c4a7769ff43 (patch) | |
tree | 0895233389a4dcdbb043399efb8f3cbf62e832df /bfd/elf32-microblaze.c | |
parent | d023c380db01abd7f6f2a53edecca09488b53982 (diff) | |
download | gdb-fb34365b48184914756d2bf103c60c4a7769ff43.zip gdb-fb34365b48184914756d2bf103c60c4a7769ff43.tar.gz gdb-fb34365b48184914756d2bf103c60c4a7769ff43.tar.bz2 |
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-microblaze.c')
-rw-r--r-- | bfd/elf32-microblaze.c | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 4c5a38d..47e4d51 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -1,6 +1,6 @@ /* Xilinx MicroBlaze-specific support for 32-bit ELF - Copyright 2009 Free Software Foundation, Inc. + Copyright 2009, 2010 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -1819,38 +1819,20 @@ microblaze_elf_relax_section (bfd *abfd, static asection * microblaze_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)) - { - case R_MICROBLAZE_GNU_VTINHERIT: - case R_MICROBLAZE_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; + switch (ELF32_R_TYPE (rel->r_info)) + { + case R_MICROBLAZE_GNU_VTINHERIT: + case R_MICROBLAZE_GNU_VTENTRY: + return NULL; + } + + return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); } /* Update the got entry reference counts for the section being removed. */ |