* 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 a85352579fd1d8a511e8b9778d0c976403b5e6cf..ee3a2d09d93dafa0d4c9f5d4aeab1ac3714380ce 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 80ce5b23aad424aa0c2cbf28381eb85cbd401793..eb6d55e042544d02b09bae6404a9ff621de734ea 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;
        }