Support RelocatableReadOnlyData section type in CmmParse, and use it where needed...
authorwolfgang.thaller@gmx.net <unknown>
Sun, 22 Oct 2006 16:06:50 +0000 (16:06 +0000)
committerwolfgang.thaller@gmx.net <unknown>
Sun, 22 Oct 2006 16:06:50 +0000 (16:06 +0000)
This is needed for position-independent code on Mac OS X
(both i386 and powerpc), when compiling the RTS with -fasm.

compiler/cmm/CmmParse.y
utils/genapply/GenApply.hs

index 05ec274..20edd51 100644 (file)
@@ -424,6 +424,7 @@ section :: String -> Section
 section "text"  = Text
 section "data"          = Data
 section "rodata" = ReadOnlyData
+section "relrodata" = RelocatableReadOnlyData
 section "bss"   = UninitialisedData
 section s       = OtherSection s
 
index 6827703..39d8506 100644 (file)
@@ -732,7 +732,7 @@ genStackFns regstatus args
 
 genStackApplyArray types =
   vcat [
-    text "section \"rodata\" {",
+    text "section \"relrodata\" {",
     text "stg_ap_stack_entries:",
     text "W_ 0; W_ 0; W_ 0;", -- ARG_GEN, ARG_GEN_BIG, ARG_BCO
     vcat (map arr_ent types),
@@ -743,7 +743,7 @@ genStackApplyArray types =
 
 genStackSaveArray types =
   vcat [
-    text "section \"rodata\" {",
+    text "section \"relrodata\" {",
     text "stg_stack_save_entries:",
     text "W_ 0; W_ 0; W_ 0;", -- ARG_GEN, ARG_GEN_BIG, ARG_BCO
     vcat (map arr_ent types),