aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorLulu Cai <cailulu@loongson.cn>2023-10-11 10:20:45 +0800
committerliuzhensong <liuzhensong@loongson.cn>2023-10-24 15:27:39 +0800
commitf87cf663af71e5d78c8d647fa48562102f3b0615 (patch)
tree750778d8b2df5d7f5b8178baba302714e6de0190 /gas/config
parent8bf3b48f72728208ad09989edfac9e010a62a703 (diff)
downloadgdb-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')
-rw-r--r--gas/config/tc-loongarch.c2
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);