]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: overflow and underflow checks for R_LARCH_32_PCREL
authorLulu Cai <cailulu@loongson.cn>
Tue, 20 May 2025 11:38:12 +0000 (19:38 +0800)
committercailulu <cailulu@loongson.cn>
Mon, 26 May 2025 06:59:42 +0000 (14:59 +0800)
commit95d54e0c6e4c558e8f39c0167221e81b0eec6069
tree8b43c81b0d494747875bfb316a155eff55aff326
parent378d39e87f6bbfd72dde77e77eba035737871d34
LoongArch: overflow and underflow checks for R_LARCH_32_PCREL

Relocation overflows can silently write incorrect value to
the file, so overflow checks are added to avoid this.
bfd/elfnn-loongarch.c
bfd/elfxx-loongarch.c
ld/testsuite/ld-loongarch-elf/32_pcrel.s [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
ld/testsuite/ld-loongarch-elf/overflow_32_pcrel.d [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/underflow_32_pcrel.d [new file with mode: 0644]