diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2021-02-13 16:44:19 +0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-29 17:25:49 -0400 |
commit | e754ff7f178a629a2261cba77a29d9510391aebd (patch) | |
tree | 77aca9f315288b52efbc9d410a57300a4029279d /compiler/GHC/Unit | |
parent | 4421fb34b3a70db1323833337c94ac4364824124 (diff) | |
download | haskell-e754ff7f178a629a2261cba77a29d9510391aebd.tar.gz |
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.
Diffstat (limited to 'compiler/GHC/Unit')
-rw-r--r-- | compiler/GHC/Unit/Info.hs | 7 |
1 files changed, 3 insertions, 4 deletions
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 - |