X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-cr16.c;h=6d7962dc968fef227679018ef8961c87db74dc94;hb=60d67dc84bbc7d73672d297d714f8a4a0547618d;hp=c36388eb76a368ec23707630971bc912c2df665b;hpb=bc4e12ded1d4c8d589d82b2a10ade6b47f219db3;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index c36388eb76..6d7962dc96 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -2207,18 +2207,6 @@ elf32_cr16_gc_mark_hook (asection *sec, return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); } -/* Update the got entry reference counts for the section being removed. */ - -static bfd_boolean -elf32_cr16_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) -{ - /* We don't support garbage collection of GOT and PLT relocs yet. */ - return TRUE; -} - /* Create dynamic sections when linking against a dynamic object. */ static bfd_boolean @@ -2320,7 +2308,7 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, /* Make sure we know what is going on here. */ BFD_ASSERT (dynobj != NULL && (h->needs_plt - || h->u.weakdef != NULL + || h->is_weakalias || (h->def_dynamic && h->ref_regular && !h->def_regular))); @@ -2370,12 +2358,12 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, /* If this is a weak symbol, and there is a real definition, the processor independent code will have arranged for us to see the real definition first, and we can just use the same value. */ - if (h->u.weakdef != NULL) + if (h->is_weakalias) { - BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined - || h->u.weakdef->root.type == bfd_link_hash_defweak); - h->root.u.def.section = h->u.weakdef->root.u.def.section; - h->root.u.def.value = h->u.weakdef->root.u.def.value; + struct elf_link_hash_entry *def = weakdef (h); + BFD_ASSERT (def->root.type == bfd_link_hash_defined); + h->root.u.def.section = def->root.u.def.section; + h->root.u.def.value = def->root.u.def.value; return TRUE; } @@ -2916,7 +2904,6 @@ _bfd_cr16_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE #define bfd_elf32_bfd_get_relocated_section_contents \ elf32_cr16_get_relocated_section_contents #define elf_backend_gc_mark_hook elf32_cr16_gc_mark_hook -#define elf_backend_gc_sweep_hook elf32_cr16_gc_sweep_hook #define elf_backend_can_gc_sections 1 #define elf_backend_rela_normal 1 #define elf_backend_check_relocs cr16_elf_check_relocs