27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
Fix label type for __stginit_* labels: those are .data labels, not .text
|
|
|
|
Noticed when was building --enable-unregisterised build for x86_64:
|
|
|
|
/tmp/ghc22931_0/ghc_3.hc:5:9: error:
|
|
error: '__stginit_ghczmprim_GHCziTypes' redeclared as different kind of symbol
|
|
StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
|
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
5 | StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
|
|
| ^
|
|
|
|
In file included from /tmp/ghc22931_0/ghc_3.hc:3:0: error:
|
|
|
|
/tmp/ghc22931_0/ghc_3.hc:4:5: error:
|
|
note: previous declaration of '__stginit_ghczmprim_GHCziTypes' was here
|
|
EF_(__stginit_ghczmprim_GHCziTypes);
|
|
^
|
|
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
|
|
index 77a889a..05d71ab 100644
|
|
--- a/compiler/cmm/CLabel.hs
|
|
+++ b/compiler/cmm/CLabel.hs
|
|
@@ -956,3 +956,3 @@ labelType (CaseLabel _ CaseReturnInfo) = DataLabel
|
|
labelType (CaseLabel _ _) = CodeLabel
|
|
-labelType (PlainModuleInitLabel _) = CodeLabel
|
|
+labelType (PlainModuleInitLabel _) = DataLabel
|
|
labelType (SRTLabel _) = DataLabel
|