Commit 0b03b302 by Kai Tietz Committed by Kai Tietz

Enable trampoline code for nx-protected stack Windows.

	* config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New.
	(MINGW_ENABLE_EXECUTE_STACK): New.
	(IN_LIBGCC2): For libgcc include windows.h file for
	function declarations.

From-SVN: r134089
parent 582be0a1
2008-04-08 Kai Tietz <kai.tietz@onevision.com>
* config/i386/mingw32.h (ENABLE_EXECUTE_STACK): New.
(MINGW_ENABLE_EXECUTE_STACK): New.
(IN_LIBGCC2): For libgcc include windows.h file for
function declarations.
2008-04-08 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.c (cris_address_cost): For a PLUS, swap tem1
......
......@@ -164,6 +164,27 @@ do { \
#undef TARGET_USE_JCR_SECTION
#define TARGET_USE_JCR_SECTION 1
#undef MINGW_ENABLE_EXECUTE_STACK
#define MINGW_ENABLE_EXECUTE_STACK \
extern void __enable_execute_stack (void *); \
void \
__enable_execute_stack (void *addr) \
{ \
MEMORY_BASIC_INFORMATION b; \
if (!VirtualQuery (addr, &b, sizeof(b))) \
abort (); \
VirtualProtect (b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, \
&b.Protect); \
}
#undef ENABLE_EXECUTE_STACK
#define ENABLE_EXECUTE_STACK MINGW_ENABLE_EXECUTE_STACK
#ifdef IN_LIBGCC2
#include <windows.h>
#endif
#if !TARGET_64BIT
#define MD_UNWIND_SUPPORT "config/i386/w32-unwind.h"
#endif
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