Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
1d012e31
Commit
1d012e31
authored
Nov 30, 2011
by
Simon Marlow
Browse files
loadArchive: need to allocate executable memory on Win32 (#5371)
parent
63e49e13
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/Linker.c
View file @
1d012e31
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment