From 3162b1e745e3520d3c9d23740b93096b82b40fbf Mon Sep 17 00:00:00 2001 From: nickc Date: Thu, 13 Jul 2006 09:07:36 +0000 Subject: [PATCH] * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info() returning a NULL value. --- bfd/ChangeLog | 5 +++++ bfd/coff-sh.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 411f704db2..753f9183c5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-07-13 Nick Clifton + + * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info() + returning a NULL value. + 2006-07-12 H.J. Lu PR ld/2884 diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index fcfee71898..bc03d5fa55 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; } -- 2.11.0