as: fixed internal error when immediate value of relocation overflow.
authorLulu Cai <cailulu@loongson.cn>
Wed, 11 Oct 2023 02:20:45 +0000 (10:20 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Tue, 24 Oct 2023 07:27:39 +0000 (15:27 +0800)
commitf87cf663af71e5d78c8d647fa48562102f3b0615
tree750778d8b2df5d7f5b8178baba302714e6de0190
parent8bf3b48f72728208ad09989edfac9e010a62a703
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.
bfd/elfxx-loongarch.c
gas/config/tc-loongarch.c
gas/testsuite/gas/loongarch/imm_overflow.d [new file with mode: 0644]
gas/testsuite/gas/loongarch/imm_overflow.l [new file with mode: 0644]
gas/testsuite/gas/loongarch/imm_overflow.s [new file with mode: 0644]
gas/testsuite/gas/loongarch/imm_unalign.d [new file with mode: 0644]
gas/testsuite/gas/loongarch/imm_unalign.l [new file with mode: 0644]
gas/testsuite/gas/loongarch/imm_unalign.s [new file with mode: 0644]