]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: gas: Try to avoid R_LARCH_ALIGN associate with a symbol
authormengqinggang <mengqinggang@loongson.cn>
Mon, 5 Feb 2024 08:16:52 +0000 (16:16 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 23 Feb 2024 07:40:34 +0000 (15:40 +0800)
commitc429c4459865284a0059cbabdde0449eb7df0774
tree906de2ed770ca3d5ca7a2189dd44127302ac52ff
parent97f2a34ed1d255ea301f858b31c0fbe75da1c4f6
LoongArch: gas: Try to avoid R_LARCH_ALIGN associate with a symbol

The R_LARCH_ALIGN need to associated with a symbol if .align has the first
and third expressions. If R_LARCH_ALIGN associate with a symbol, the addend can
represent the first and third expression of .align.

For '.align 3', the addend of R_LARCH_ALIGN only need to represent the alignment
and R_LARCH_ALIGN not need to associate with a symbol.

For '.align x, , y', R_LARCH_ALIGN need to associate with a symbol if 0 < y <
2^x - 4.
gas/config/tc-loongarch.c
gas/testsuite/gas/loongarch/relax_align.d
gas/testsuite/gas/loongarch/relax_align.s