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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153606
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
}
#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
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.
#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>
@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}
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