]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info() returning a NULL
authorNick Clifton <nickc@redhat.com>
Thu, 13 Jul 2006 09:07:36 +0000 (09:07 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 13 Jul 2006 09:07:36 +0000 (09:07 +0000)
  value.

bfd/ChangeLog
bfd/coff-sh.c

index 411f704db217b2c05726474c77b7262e9b46009a..753f9183c552845e891780560e981c5f244dafc0 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-13  Nick Clifton  <nickc@redhat.com>
+
+       * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info()
+       returning a NULL value.
+
 2006-07-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/2884
index fcfee718982d190695d0e5ce6d8104f97dbd65cd..bc03d5fa552246d61a39567c25a3406151ee4059 100644 (file)
@@ -2510,8 +2510,9 @@ _bfd_sh_align_load_span (abfd, sec, contents, swap, relocs,
 
                  next2_insn = bfd_get_16 (abfd, contents + i + 4);
                  next2_op = sh_insn_info (next2_insn);
-                 if ((next2_op->flags & (LOAD | STORE)) == 0
-                     && sh_load_use (insn, op, next2_insn, next2_op))
+                 if (next2_op == NULL
+                     || ((next2_op->flags & (LOAD | STORE)) == 0
+                         && sh_load_use (insn, op, next2_insn, next2_op)))
                    ok = FALSE;
                }