]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN
authormengqinggang <mengqinggang@loongson.cn>
Fri, 8 Dec 2023 07:15:50 +0000 (15:15 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 22 Dec 2023 06:20:18 +0000 (14:20 +0800)
commitc3d507aba3ec2c9b3f9aa105a01cf80ecc0b8c9b
tree46b9a5155634c7e2122319f6adeba51d6ded0c03
parent866a2ad35b75cbc60260c00b82bec2243877355f
LoongArch: Add support for the third expression of .align for R_LARCH_ALIGN

If the symbol index is not zero, the addend is used to represent
the first and the third expressions of the .align.

The lowest 8 bits are used to represent the first expression.
Other bits are used to represent the third expression.

The addend of R_LARCH_ALIGN for ".align 5, ,4" is 0x405.
The addend of R_LARCH_ALIGN for ".balign 32, ,4" is 0x405.
14 files changed:
bfd/elfnn-loongarch.c
bfd/elfxx-loongarch.c
gas/config/tc-loongarch.c
gas/config/tc-loongarch.h
gas/testsuite/gas/loongarch/relax_align.d
gas/testsuite/gas/loongarch/relax_align.s
ld/testsuite/ld-elf/anno-sym.d
ld/testsuite/ld-loongarch-elf/anno-sym.d [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/anno-sym.l [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/anno-sym.s [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
ld/testsuite/ld-loongarch-elf/relax-align.dd
ld/testsuite/ld-loongarch-elf/relax-align.s
ld/testsuite/ld-loongarch-elf/relax.exp