dynamicLinkerLabelInfo,
mkPicBaseLabel,
+ mkDeadStripPreventer,
infoLblToEntryLbl, entryLblToInfoLbl,
needsCDecl, isAsmTemp, externallyVisibleCLabel,
#include "HsVersions.h"
-#include "../includes/ghcconfig.h"
-import CmdLineOpts ( DynFlags, opt_Static, opt_DoTickyProfiling )
+import DynFlags ( DynFlags )
+import StaticFlags ( opt_Static, opt_DoTickyProfiling )
import Packages ( isHomeModule, isDllName )
import DataCon ( ConTag )
import Module ( moduleFS, Module )
-- as 1b, referring to the previous definition
-- of 1: in the assembler source file.
+ | DeadStripPreventer CLabel
+ -- label before an info table to prevent excessive dead-stripping on darwin
+
deriving (Eq, Ord)
data IdLabelInfo
mkSeqInfoLabel = RtsLabel (RtsInfo SLIT("stg_seq_frame"))
mkIndStaticInfoLabel = RtsLabel (RtsInfo SLIT("stg_IND_STATIC"))
mkMainCapabilityLabel = RtsLabel (RtsData SLIT("MainCapability"))
-mkMAP_FROZEN_infoLabel = RtsLabel (RtsInfo SLIT("stg_MUT_ARR_PTRS_FROZEN"))
+mkMAP_FROZEN_infoLabel = RtsLabel (RtsInfo SLIT("stg_MUT_ARR_PTRS_FROZEN0"))
mkEMPTY_MVAR_infoLabel = RtsLabel (RtsInfo SLIT("stg_EMPTY_MVAR"))
mkTopTickyCtrLabel = RtsLabel (RtsData SLIT("top_ct"))
mkPicBaseLabel :: CLabel
mkPicBaseLabel = PicBaseLabel
+mkDeadStripPreventer :: CLabel -> CLabel
+mkDeadStripPreventer lbl = DeadStripPreventer lbl
+
-- -----------------------------------------------------------------------------
-- Converting info labels to entry labels.
needsCDecl (PlainModuleInitLabel _ _) = True
needsCDecl ModuleRegdLabel = False
-needsCDecl (CaseLabel _ _) = False
needsCDecl (StringLitLabel _) = False
needsCDecl (AsmTempLabel _) = False
needsCDecl (RtsLabel _) = False
pprCLabel PicBaseLabel
= ptext SLIT("1b")
+
+pprCLabel (DeadStripPreventer lbl)
+ = pprCLabel lbl <> ptext SLIT("_dsp")
#endif
pprCLabel lbl =