X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-d10v.c;h=a5e5395163c50cd73d9de576622a07c54ed2a01c;hb=5f101a3d6f22d0d98898df1f8cf8c406c5d96777;hp=f6a1d926c85a70d5dbc8025494b0e91f6f4e30d7;hpb=3db64b009284dda3a1ce10a91beb1297475e60a7;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index f6a1d926c8..a5e5395163 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -262,7 +262,7 @@ elf32_d10v_check_relocs (bfd *abfd, const Elf_Internal_Rela *relocs) { Elf_Internal_Shdr *symtab_hdr; - struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; + struct elf_link_hash_entry **sym_hashes; const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; @@ -271,9 +271,6 @@ elf32_d10v_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; for (rel = relocs; rel < rel_end; rel++) @@ -304,7 +301,9 @@ elf32_d10v_check_relocs (bfd *abfd, /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_D10V_GNU_VTENTRY: - if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) + BFD_ASSERT (h != NULL); + if (h != NULL + && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) return FALSE; break; }