diff options
author | Lulu Cai <cailulu@loongson.cn> | 2023-10-11 10:20:45 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2023-10-24 15:27:39 +0800 |
commit | f87cf663af71e5d78c8d647fa48562102f3b0615 (patch) | |
tree | 750778d8b2df5d7f5b8178baba302714e6de0190 /gas/config/tc-loongarch.c | |
parent | 8bf3b48f72728208ad09989edfac9e010a62a703 (diff) | |
download | gdb-f87cf663af71e5d78c8d647fa48562102f3b0615.zip gdb-f87cf663af71e5d78c8d647fa48562102f3b0615.tar.gz gdb-f87cf663af71e5d78c8d647fa48562102f3b0615.tar.bz2 |
as: fixed internal error when immediate value of relocation overflow.
The as and ld use _bfd_error_handler to output error messages when
checking relocation alignment and relocation overflow. However, the
abfd value passed by as to the function is NULL, resulting in an
internal error. The ld passes a non-null value to the function,
so it can output an error message normally.
Diffstat (limited to 'gas/config/tc-loongarch.c')
-rw-r--r-- | gas/config/tc-loongarch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-loongarch.c b/gas/config/tc-loongarch.c index b563982..33f3e71 100644 --- a/gas/config/tc-loongarch.c +++ b/gas/config/tc-loongarch.c @@ -1234,7 +1234,7 @@ static void fix_reloc_insn (fixS *fixP, bfd_vma reloc_val, char *buf) insn = bfd_getl32 (buf); if (!loongarch_adjust_reloc_bitsfield (NULL, howto, &reloc_val)) - as_warn_where (fixP->fx_file, fixP->fx_line, "Reloc overflow"); + as_bad_where (fixP->fx_file, fixP->fx_line, "Reloc overflow"); insn = (insn & (insn_t)howto->src_mask) | ((insn & (~(insn_t)howto->dst_mask)) | reloc_val); |