summaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-08-17 20:39:34 +0000
committerNick Clifton <nickc@redhat.com>2008-08-17 20:39:34 +0000
commit73abd405a6029a0a87705d14331189e5bdc10e66 (patch)
treec3f21f8e5e200274fd8c3d9158a1c1b76031a07c /bfd/elfxx-mips.c
parent2392f770fef44985763cd1d1c35dff29f4647cb2 (diff)
downloadgdb-73abd405a6029a0a87705d14331189e5bdc10e66.tar.gz
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
where the sym_hashes are not available.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 80ce5b23aad..eb6d55e0425 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7433,8 +7433,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
else
{
h = sym_hashes[r_symndx - extsymoff];
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
+ while (h != NULL
+ && (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning))
h = (struct elf_link_hash_entry *) h->root.u.i.link;
}