blob: 81e751d778c8b67410b58e369069cba673416bcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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
|