Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/1d012e31577951ff5fe74d0277fabdb08c27929d

>---------------------------------------------------------------

commit 1d012e31577951ff5fe74d0277fabdb08c27929d
Author: Simon Marlow <[email protected]>
Date:   Wed Nov 30 15:34:00 2011 +0000

    loadArchive: need to allocate executable memory on Win32 (#5371)

>---------------------------------------------------------------

 rts/Linker.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 96a0741..cf2d85a 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1997,6 +1997,11 @@ loadArchive( char *path )
                we could do better. */
 #if defined(USE_MMAP)
             image = mmapForLinker(memberSize, MAP_ANONYMOUS, -1);
+#elif defined(mingw32_HOST_OS)
+        // TODO: We would like to use allocateExec here, but allocateExec
+        //       cannot currently allocate blocks large enough.
+            image = VirtualAlloc(NULL, memberSize, MEM_RESERVE | MEM_COMMIT,
+                                 PAGE_EXECUTE_READWRITE);
 #elif defined(darwin_HOST_OS)
             /* See loadObj() */
             misalignment = machoGetMisalignment(f);



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to