Commit c6fca740 authored by Ben Gamari's avatar Ben Gamari 🐢

rts: Don't use MAP_32BIT on Darwin

As noted in #17353, Catalina added support for MAP_32BIT but disallows
W|X mappings when it's enabled. Since we still use W|X mappins we can't
use MAP_32BIT.
parent 28aec5ff
......@@ -190,9 +190,10 @@ int ocTryLoad( ObjectCode* oc );
* small memory model on this architecture (see gcc docs,
* -mcmodel=small).
*
* MAP_32BIT not available on OpenBSD/amd64
* MAP_32BIT not available on OpenBSD/amd64.
* Also, MAP_32BIT does not permit W|X mappings on Darwin (see #17353).
*/
#if defined(x86_64_HOST_ARCH) && defined(MAP_32BIT)
#if defined(x86_64_HOST_ARCH) && !defined(darwin_HOST_OS) && defined(MAP_32BIT)
#define TRY_MAP_32BIT MAP_32BIT
#else
#define TRY_MAP_32BIT 0
......
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