From e754ff7f178a629a2261cba77a29d9510391aebd Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Sat, 13 Feb 2021 16:44:19 +0800 Subject: Allocate Adjustors and mark them readable in two steps This drops allocateExec for darwin, and replaces it with a alloc, write, mark executable strategy instead. This prevents us from trying to allocate an executable range and then write to it, which X^W will prohibit on darwin. This will *only* work if we can use mmap. --- compiler/GHC/Unit/Info.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/Unit') diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs index d95ea5b442..f88a9ea94b 100644 --- a/compiler/GHC/Unit/Info.hs +++ b/compiler/GHC/Unit/Info.hs @@ -248,10 +248,9 @@ unitHsLibs namever ways0 p = map (mkDynName . addSuffix . ST.unpack) (unitLibrar -- This change elevates the need to add custom hooks -- and handling specifically for the `rts` package for -- example in ghc-cabal. - addSuffix rts@"HSrts" = rts ++ (expandTag rts_tag) - addSuffix rts@"HSrts-1.0"= rts ++ (expandTag rts_tag) - addSuffix other_lib = other_lib ++ (expandTag tag) + addSuffix rts@"HSrts" = rts ++ (expandTag rts_tag) + addSuffix rts@"HSrts-1.0.1" = rts ++ (expandTag rts_tag) + addSuffix other_lib = other_lib ++ (expandTag tag) expandTag t | null t = "" | otherwise = '_':t - -- cgit v1.2.1