aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-alpha.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-06-19 17:01:22 +0000
committerIan Lance Taylor <ian@airs.com>1996-06-19 17:01:22 +0000
commitfaa3f5397d34aba304825b7519fc11af9098e6b2 (patch)
tree9791270b24b265e3dce35f776d74f9c6aef7aa90 /gas/config/tc-alpha.c
parent7fc6a16a7f38dcf16be6852fc303aa9dd32838ad (diff)
downloadgdb-faa3f5397d34aba304825b7519fc11af9098e6b2.zip
gdb-faa3f5397d34aba304825b7519fc11af9098e6b2.tar.gz
gdb-faa3f5397d34aba304825b7519fc11af9098e6b2.tar.bz2
* config/tc-alpha.c (tc_gen_reloc): Output a sensible error
message if bfd_reloc_type_lookup fails, rather than calling assert.
Diffstat (limited to 'gas/config/tc-alpha.c')
-rw-r--r--gas/config/tc-alpha.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 588041b..a597dbc 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",