X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fcmm%2FCLabel.hs;h=e73232176b5d017b0aa8418bc77953202850f7f6;hb=153b9cb9b11e05c4edb1b6bc0a7b972660e41f70;hp=6f95be9daab3ce604c47fcad69a73bb15162c311;hpb=7a1b0a6cba556511688cb1824f48e31fe6c4cc07;p=ghc-hetmet.git diff --git a/ghc/compiler/cmm/CLabel.hs b/ghc/compiler/cmm/CLabel.hs index 6f95be9..e732321 100644 --- a/ghc/compiler/cmm/CLabel.hs +++ b/ghc/compiler/cmm/CLabel.hs @@ -87,6 +87,7 @@ module CLabel ( dynamicLinkerLabelInfo, mkPicBaseLabel, + mkDeadStripPreventer, infoLblToEntryLbl, entryLblToInfoLbl, needsCDecl, isAsmTemp, externallyVisibleCLabel, @@ -97,7 +98,6 @@ module CLabel ( #include "HsVersions.h" -#include "../includes/ghcconfig.h" import CmdLineOpts ( DynFlags, opt_Static, opt_DoTickyProfiling ) import Packages ( isHomeModule, isDllName ) @@ -197,6 +197,9 @@ data CLabel -- 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 @@ -402,6 +405,9 @@ dynamicLinkerLabelInfo _ = Nothing mkPicBaseLabel :: CLabel mkPicBaseLabel = PicBaseLabel +mkDeadStripPreventer :: CLabel -> CLabel +mkDeadStripPreventer lbl = DeadStripPreventer lbl + -- ----------------------------------------------------------------------------- -- Converting info labels to entry labels. @@ -619,6 +625,9 @@ pprCLabel (DynamicLinkerLabel info lbl) pprCLabel PicBaseLabel = ptext SLIT("1b") + +pprCLabel (DeadStripPreventer lbl) + = pprCLabel lbl <> ptext SLIT("_dsp") #endif pprCLabel lbl =