diff options
author | Tuan Le <ihnaut.if@gmail.com> | 2020-05-04 16:40:01 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-05-21 12:16:46 -0400 |
commit | 0004ccb885e534c386ceae21580fc59ec7ad0ede (patch) | |
tree | eb377eaf30ed7e5e02d02005210b515b869bd88d /compiler/GHC/CmmToLlvm | |
parent | cf5663300c3d8b8b3c7dc2cd0dce2c923ec68987 (diff) | |
download | haskell-0004ccb885e534c386ceae21580fc59ec7ad0ede.tar.gz |
llvmGen: Consider Relocatable read-only data as not constantReferences: #18137
Diffstat (limited to 'compiler/GHC/CmmToLlvm')
-rw-r--r-- | compiler/GHC/CmmToLlvm/Data.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/CmmToLlvm/Data.hs b/compiler/GHC/CmmToLlvm/Data.hs index b8db6ba4ed..aa91621cfd 100644 --- a/compiler/GHC/CmmToLlvm/Data.hs +++ b/compiler/GHC/CmmToLlvm/Data.hs @@ -83,7 +83,8 @@ genLlvmData (sec, CmmStaticsRaw lbl xs) = do Section CString _ -> if (platformArch platform == ArchS390X) then Just 2 else Just 1 _ -> Nothing - const = if isSecConstant sec then Constant else Global + const = if sectionProtection sec == ReadOnlySection + then Constant else Global varDef = LMGlobalVar label tyAlias link lmsec align const globDef = LMGlobal varDef struct |