From d6a4742b51eefdf6016071cf4dad280ba11bcbdb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 26 Nov 2007 01:43:43 +0000 Subject: [PATCH] * config/tc-alpha.c (assemble_insn): Don't segv on NULL reloc_operand. --- gas/ChangeLog | 4 ++++ gas/config/tc-alpha.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index a0808a784..4dbbd0205 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2007-11-26 Thomas Ogrisegg + + * config/tc-alpha.c (assemble_insn): Don't segv on NULL reloc_operand. + 2007-11-19 Bob Wilson * config/xtensa-istack.h (tinsn_struct): Replace linenum field diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 2d0407847..29fa92201 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -1968,7 +1968,8 @@ assemble_insn (const struct alpha_opcode *opcode, { reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, reloc); - if (reloc_howto->bitsize != reloc_operand->bits) + if (reloc_operand == NULL + || reloc_howto->bitsize != reloc_operand->bits) { as_bad (_("invalid relocation for field")); return; -- 2.11.4.GIT