aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-07-13 09:07:36 +0000
committerNick Clifton <nickc@redhat.com>2006-07-13 09:07:36 +0000
commit230d6d81b022f8dce5f2f68b127041d329fa553a (patch)
treecdbb3b0c070e1b261b91421e22eb79c96659d7b1
parent9af2a05463af610d6e166ba4e2831f8fbca7cfb0 (diff)
downloadgdb-230d6d81b022f8dce5f2f68b127041d329fa553a.zip
gdb-230d6d81b022f8dce5f2f68b127041d329fa553a.tar.gz
gdb-230d6d81b022f8dce5f2f68b127041d329fa553a.tar.bz2
* coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info() returning a NULL
value.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coff-sh.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 411f704..753f918 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index fcfee71..bc03d5f 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -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;
}