commit | 7345d05aafde53a48d5a587a6d9c1778db78e0f3 | [log] [tgz] |
---|---|---|
author | Andreas Schwab <schwab@suse.de> | Thu Sep 21 16:49:41 2023 +0200 |
committer | Andreas Schwab <schwab@suse.de> | Mon Sep 25 12:36:58 2023 +0200 |
tree | 2402f4d9ecda856d80e8fc4f1ce1c54b8609baab | |
parent | a47d304b1229ecf8912fac17ee9c48d1bf3c729a [diff] |
RISC-V: Protect .got with relro Move .got before .data so that it can be protected with -zrelro. Also separate .got.plt from .got if -znow is not in effect; the first two words of .got.plt are placed within the relro region. ld: PR ld/30877 * emulparams/elf32lriscv-defs.sh (DATA_GOT, SEPARATE_GOTPLT): Define. * emulparams/elf64lriscv-defs.sh (SEPARATE_GOTPLT): Define. * testsuite/ld-elf/binutils.exp (binutils_test): Remove riscv*-*-* from relro_got expression.