This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.
- From: Paul Koning <paulkoning at comcast dot net>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 26 Nov 2018 08:19:45 -0500
- Subject: Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.
- References: <1543223609-9550-1-git-send-email-mark@klomp.org>
> On Nov 26, 2018, at 4:13 AM, Mark Wielaard <mark@klomp.org> wrote:
>
> With -Wtrampolines a warning is produced whenever gcc generates executable
> code on the stack at runtime to support taking a nested function address
> that is used to call the nested function indirectly when it needs to access
> any variables in its lexical scope.
>
> As a result the stack has to be marked as executable even for targets which
> have a non-executable stack as default.
>
> Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_STACK for those targets
> that have a non-executable default stack based on when they call
> file_end_indicate_exec_stack.
The word "default" suggests this is a constant attribute of the platform. Can it be variable? Whether the stack is executable or not may depend on -m<something> switches.
paul