X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=bfd%2Felf32-mcore.c;h=8bdb26634650bd446349df60f202b12841c4e965;hp=2eef4b4c45bbc8bfb109d17a1f96e7daacf9e0d7;hb=88750007d7869f178f0ba528f41efd3b74c424cf;hpb=6df9443a374e2b81278c61b8afc0a1eef7db280b diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c index 2eef4b4..8bdb266 100644 --- a/bfd/elf32-mcore.c +++ b/bfd/elf32-mcore.c @@ -594,7 +594,6 @@ mcore_elf_check_relocs (bfd * abfd, { Elf_Internal_Shdr * symtab_hdr; struct elf_link_hash_entry ** sym_hashes; - struct elf_link_hash_entry ** sym_hashes_end; const Elf_Internal_Rela * rel; const Elf_Internal_Rela * rel_end; @@ -603,9 +602,6 @@ mcore_elf_check_relocs (bfd * abfd, symtab_hdr = & elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym); - if (!elf_bad_symtab (abfd)) - sym_hashes_end -= symtab_hdr->sh_info; rel_end = relocs + sec->reloc_count; @@ -638,7 +634,9 @@ mcore_elf_check_relocs (bfd * abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_MCORE_GNU_VTENTRY: - if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) + BFD_ASSERT (h != NULL); + if (h != NULL + && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) return FALSE; break; }