This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR880088 Enable -Wtrampolines for no-exec-stack targets with -Wall.



> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]