summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Cmm.hs')
-rw-r--r--compiler/GHC/Cmm.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/GHC/Cmm.hs b/compiler/GHC/Cmm.hs
index 893ca556db..4f8bdbd77a 100644
--- a/compiler/GHC/Cmm.hs
+++ b/compiler/GHC/Cmm.hs
@@ -184,6 +184,9 @@ data SectionType
| RelocatableReadOnlyData
| UninitialisedData
| ReadOnlyData16 -- .rodata.cst16 on x86_64, 16-byte aligned
+ -- See Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini
+ | InitArray -- .init_array on ELF, .ctor on Windows
+ | FiniArray -- .fini_array on ELF, .dtor on Windows
| CString
| OtherSection String
deriving (Show)
@@ -201,6 +204,8 @@ sectionProtection (Section t _) = case t of
ReadOnlyData -> ReadOnlySection
RelocatableReadOnlyData -> WriteProtectedSection
ReadOnlyData16 -> ReadOnlySection
+ InitArray -> ReadOnlySection
+ FiniArray -> ReadOnlySection
CString -> ReadOnlySection
Data -> ReadWriteSection
UninitialisedData -> ReadWriteSection