diff options
Diffstat (limited to 'compiler/GHC/Cmm')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 5 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Info/Build.hs | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index 7a3e55dcf9..3d21855ec2 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -1082,8 +1082,8 @@ isLocalCLabel this_mod lbl = -- that data resides in a DLL or not. [Win32 only.] -- @labelDynamic@ returns @True@ if the label is located -- in a DLL, be it a data reference or not. -labelDynamic :: NCGConfig -> Module -> CLabel -> Bool -labelDynamic config this_mod lbl = +labelDynamic :: NCGConfig -> CLabel -> Bool +labelDynamic config lbl = case lbl of -- is the RTS in a DLL or not? RtsLabel _ -> @@ -1136,6 +1136,7 @@ labelDynamic config this_mod lbl = externalDynamicRefs = ncgExternalDynamicRefs config platform = ncgPlatform config os = platformOS platform + this_mod = ncgThisModule config this_unit = toUnitId (moduleUnit this_mod) diff --git a/compiler/GHC/Cmm/Info/Build.hs b/compiler/GHC/Cmm/Info/Build.hs index b2078ae462..b43eaa1257 100644 --- a/compiler/GHC/Cmm/Info/Build.hs +++ b/compiler/GHC/Cmm/Info/Build.hs @@ -946,7 +946,8 @@ oneSRT dflags staticFuns lbls caf_lbls isCAF cafs static_data = do topSRT <- get let - config = initNCGConfig dflags + this_mod = thisModule topSRT + config = initNCGConfig dflags this_mod profile = targetProfile dflags platform = profilePlatform profile srtMap = moduleSRTMap topSRT @@ -1019,8 +1020,6 @@ oneSRT dflags staticFuns lbls caf_lbls isCAF cafs static_data = do in state{ moduleSRTMap = srt_map } - this_mod = thisModule topSRT - allStaticData = all (\(CAFLabel clbl) -> Set.member clbl static_data) caf_lbls @@ -1048,7 +1047,7 @@ oneSRT dflags staticFuns lbls caf_lbls isCAF cafs static_data = do -- when dynamic linking is used we cannot guarantee that the offset -- between the SRT and the info table will fit in the offset field. -- Consequently we build a singleton SRT in this case. - not (labelDynamic config this_mod lbl) + not (labelDynamic config lbl) -- MachO relocations can't express offsets between compilation units at -- all, so we are always forced to build a singleton SRT in this case. |