From: Ian Lance Taylor Date: Wed, 19 Jun 1996 17:01:22 +0000 (+0000) Subject: * config/tc-alpha.c (tc_gen_reloc): Output a sensible error X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=faa3f5397d34aba304825b7519fc11af9098e6b2;p=binutils-gdb.git * config/tc-alpha.c (tc_gen_reloc): Output a sensible error message if bfd_reloc_type_lookup fails, rather than calling assert. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 07bf67f4231..3cf66b30f07 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Wed Jun 19 11:31:50 1996 Ian Lance Taylor + * config/tc-alpha.c (tc_gen_reloc): Output a sensible error + message if bfd_reloc_type_lookup fails, rather than calling + assert. + * config/tc-alpha.c (alpha_force_relocation): Add BFD_RELOC_12_PCREL to switch. diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index 588041bc26e..a597dbc6262 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -442,7 +442,13 @@ tc_gen_reloc (sec, fixp) } else reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); - assert (reloc->howto != 0); + if (reloc->howto == NULL) + { + as_bad_where (fixp->fx_file, fixp->fx_line, + "cannot represent `%s' relocation in object file", + bfd_get_reloc_code_name (fixp->fx_r_type)); + return NULL; + } if (!fixp->fx_pcrel != !reloc->howto->pc_relative) { as_fatal ("internal error? cannot generate `%s' relocation",