Commit 41ca8d08 by Kai Tietz Committed by Kai Tietz

mingw32.h (CHECK_EXECUTE_STACK_ENABLED): New macro.

2009-10-27  Kai Tietz <kai.tietz@onevision.com>

        PR/41799
        * config/i386/mingw32.h (CHECK_EXECUTE_STACK_ENABLED): New macro.
        * config/i386/mingw.opt: Add fset-stack-executable.
        * config/i386/i386.c (ix86_trampoline_init): Make call to
        emit_library_call conditional, if CHECK_EXECUTE_STACK_ENABLED is
        defined and its value is not zero.
        * doc/invoke.texi

From-SVN: r153606
parent 2c9062e2
2009-10-27 Kai Tietz <kai.tietz@onevision.com>
PR/41799
* config/i386/mingw32.h (CHECK_EXECUTE_STACK_ENABLED): New macro.
* config/i386/mingw.opt: Add fset-stack-executable.
* config/i386/i386.c (ix86_trampoline_init): Make call to
emit_library_call conditional, if CHECK_EXECUTE_STACK_ENABLED is
defined and its value is not zero.
* doc/invoke.texi
2009-10-27 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (find_func_aliases): In IPA mode
......@@ -20042,6 +20042,9 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
}
#ifdef ENABLE_EXECUTE_STACK
#ifdef CHECK_EXECUTE_STACK_ENABLED
if (CHECK_EXECUTE_STACK_ENABLED)
#endif
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
LCT_NORMAL, VOIDmode, 1, XEXP (m_tramp, 0), Pmode);
#endif
......
......@@ -21,3 +21,7 @@
Wpedantic-ms-format
C ObjC C++ ObjC++ Var(warn_pedantic_ms_format) Init(1) Warning
Warn about none ISO msvcrt scanf/printf width extensions
fset-stack-executable
Common Report Var(flag_setstackexecutable) Init(1) Optimization
For nested functions on stack executable permission is set.
......@@ -202,6 +202,8 @@ __enable_execute_stack (void *addr) \
#undef ENABLE_EXECUTE_STACK
#define ENABLE_EXECUTE_STACK MINGW_ENABLE_EXECUTE_STACK
#undef CHECK_EXECUTE_STACK_ENABLED
#define CHECK_EXECUTE_STACK_ENABLED flag_setstackexecutable
#ifdef IN_LIBGCC2
#include <windows.h>
......
......@@ -877,7 +877,8 @@ See i386 and x86-64 Options.
@emph{i386 and x86-64 Windows Options}
@gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll
-mnop-fun-dllimport -mthread -municode -mwin32 -mwindows}
-mnop-fun-dllimport -mthread -municode -mwin32 -mwindows
-fno-set-stack-executable}
@emph{Xstormy16 Options}
@gccoptlist{-msim}
......@@ -16704,6 +16705,14 @@ specifies that a GUI application is to be generated by
instructing the linker to set the PE header subsystem type
appropriately.
@item -fno-set-stack-executable
@opindex fno-set-stack-executable
This option is available for MinGW targets. It specifies that
the executable flag for stack used by nested functions isn't
set. This is necessary for binaries running in kernel mode of
Windows, as there the user32 API, which is used to set executable
privileges, isn't available.
@item -mpe-aligned-commons
@opindex mpe-aligned-commons
This option is available for Cygwin and MinGW targets. It
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment