Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Kito Cheng via Gcc-patches
RISC-V qemu default that to false, which mean stack can't execute anything by default, that's match RISC-V linux kernel behaviour, but the problem is risc-v bare metal toolchain may execute code on stack *without* that tag, that does not cause problems before for running tests on qemu user mode, bu

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Fangrui Song via Gcc-patches
On Tue, Sep 5, 2023 at 5:14 AM Kito Cheng via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > committed, thanks :) > > On Tue, Sep 5, 2023 at 3:18 PM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 8/31/23 03:05, Kito Cheng wrote: > > > We only emit that on linux target before, that not prob

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Kito Cheng via Gcc-patches
committed, thanks :) On Tue, Sep 5, 2023 at 3:18 PM Jeff Law via Gcc-patches wrote: > > > > On 8/31/23 03:05, Kito Cheng wrote: > > 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 p

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Jeff Law via Gcc-patches
On 8/31/23 03:05, Kito Cheng wrote: 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