Support RelocatableReadOnlyData section type in CmmParse, and use it where needed in AutoApply

This is needed for position-independent code on Mac OS X
(both i386 and powerpc), when compiling the RTS with -fasm.
parent 4f6f4a29
......@@ -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
......
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment