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

2018-11-29 Thread Segher Boessenkool
Hi Mark, On Thu, Nov 29, 2018 at 12:57:03PM +0100, Mark Wielaard wrote: > On Wed, 2018-11-28 at 15:00 -0600, Segher Boessenkool wrote: > > On Tue, Nov 27, 2018 at 08:54:07PM +0100, Mark Wielaard wrote: > > > On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > > > > diff --git a/gcc/co

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

2018-11-29 Thread Mark Wielaard
Hi Segher, On Wed, 2018-11-28 at 15:00 -0600, Segher Boessenkool wrote: > On Tue, Nov 27, 2018 at 08:54:07PM +0100, Mark Wielaard wrote: > > On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > > > Define a new target macro TARGET_HAS_DEFAULT_NOEXEC_STACK for > > > > those > > > > targ

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

2018-11-28 Thread Segher Boessenkool
On Tue, Nov 27, 2018 at 08:54:07PM +0100, Mark Wielaard wrote: > On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > > 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

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

2018-11-27 Thread Mark Wielaard
Hi, On Tue, 2018-11-27 at 12:37 -0600, Segher Boessenkool wrote: > > 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. > > As Paul says, that name isn't so good. >

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

2018-11-27 Thread Segher Boessenkool
Hi Mark, On Mon, Nov 26, 2018 at 10:13:29AM +0100, Mark Wielaard 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 acc

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

2018-11-26 Thread Mark Wielaard
On Mon, 2018-11-26 at 18:29 +, Joseph Myers wrote: > On Mon, 26 Nov 2018, Mark Wielaard wrote: > > > 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. > > Some

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

2018-11-26 Thread Joseph Myers
On Mon, 26 Nov 2018, Mark Wielaard wrote: > 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. Some targets (e.g. ia64) may default to no-exec stacks without needing that h

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

2018-11-26 Thread Mark Wielaard
On Mon, 2018-11-26 at 08:19 -0500, Paul Koning wrote: > > On Nov 26, 2018, at 4:13 AM, Mark Wielaard 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 c

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

2018-11-26 Thread Paul Koning
> On Nov 26, 2018, at 4:13 AM, Mark Wielaard 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 vari

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

2018-11-26 Thread Mark Wielaard
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