]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
LoongArch: ld: Move .got .got.plt before .data and protect .got with relro
authormengqinggang <mengqinggang@loongson.cn>
Wed, 3 Apr 2024 02:20:27 +0000 (10:20 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Tue, 9 Apr 2024 06:31:04 +0000 (14:31 +0800)
commit2bf280a827577eaf26d657af9f5e29dbf77e6ee2
tree4aed8bc14fe1f925b7bdb02ed1ef4262f5fbe928
parentedb30f5782826af431e26aac4362cca687e77913
LoongArch: ld: Move .got .got.plt before .data and protect .got with relro

Move .got .got.plt before .data so .got can be protected with -zrelro.
And the first two entries of .got.plt (_dl_runtime_resolve and link map)
are placed within the relro region.
bfd/elfnn-loongarch.c
ld/emulparams/elf64loongarch-defs.sh
ld/testsuite/ld-loongarch-elf/data-got.d [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/data-got.s [new file with mode: 0644]
ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp