]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Emit .note.GNU-stack for non-linux target as well
authorKito Cheng <kito.cheng@sifive.com>
Wed, 30 Aug 2023 07:10:44 +0000 (15:10 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 5 Sep 2023 12:12:22 +0000 (20:12 +0800)
commitfba0f47e4617e164716d3bce587fc6948088e225
tree5eff3b93d049ae5555ddfad648c0bd8690596efc
parenta7b048c0f42198a0f8d4244f1bd25211cf48383f
RISC-V: Emit .note.GNU-stack for non-linux target as well

We only emit that on linux target before, that not problem before,
however Qemu has fix a bug to make qemu user mode honor PT_GNU_STACK[1],
that will cause problem when we test baremetal with qemu.

So the straightforward is enable that as well for non-linux toolchian,
the price is that will increase few bytes for each binary.

[1] https://github.com/qemu/qemu/commit/872f3d046f2381e3f416519e82df96bd60818311

gcc/ChangeLog:

* config/riscv/linux.h (TARGET_ASM_FILE_END): Move ...
* config/riscv/riscv.cc (TARGET_ASM_FILE_END): to here.
gcc/config/riscv/linux.h
gcc/config/riscv/riscv.cc
This page took 0.06628 seconds and 6 git commands to generate.