* elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
authorNick Clifton <nickc@redhat.com>
Sun, 17 Aug 2008 20:39:34 +0000 (20:39 +0000)
committerNick Clifton <nickc@redhat.com>
Sun, 17 Aug 2008 20:39:34 +0000 (20:39 +0000)
  where the sym_hashes are not available.

bfd/ChangeLog
bfd/elfxx-mips.c

index a853525..ee3a2d0 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-17  Nick Clifton  <nickc@redhat.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
+       where the sym_hashes are not available.
+
 2008-08-17  Alan Modra  <amodra@bigpond.net.au>
 
        * bfd.c (struct _bfd): Correct outsymbols comment.
index 80ce5b2..eb6d55e 100644 (file)
@@ -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;
        }