summaryrefslogtreecommitdiff
path: root/lib/Language/Elna/Object
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-09-08 22:53:07 +0200
committerEugen Wissner <belka@caraus.de>2024-09-09 23:10:37 +0200
commitbb33423c31d7553e9d8f98967da4975385b35646 (patch)
treebb8f14172fa097b833cc38df3b428d61e00d080b /lib/Language/Elna/Object
parent1cbbef19afcf997315431e3aa45f824fe8a8a0e7 (diff)
downloadelna-bb33423c31d7553e9d8f98967da4975385b35646.tar.gz
Create empty relocations section
Diffstat (limited to 'lib/Language/Elna/Object')
-rw-r--r--lib/Language/Elna/Object/Elf.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/Language/Elna/Object/Elf.hs b/lib/Language/Elna/Object/Elf.hs
index 5dbbd78..7bbdccf 100644
--- a/lib/Language/Elna/Object/Elf.hs
+++ b/lib/Language/Elna/Object/Elf.hs
@@ -35,6 +35,11 @@ module Language.Elna.Object.Elf
, elfObject
, elfSectionsSize
, rInfo
+ , shfWrite
+ , shfAlloc
+ , shfExecinstr
+ , shfMascproc
+ , shfInfoLink
, stInfo
) where
@@ -352,6 +357,23 @@ instance Enum ElfSectionType
fromEnum SHT_HIUSER = 0xffffffff
fromEnum (ElfSectionType x) = fromIntegral x
+-- * Constants.
+
+shfWrite :: Elf32_Word
+shfWrite = 0x1
+
+shfAlloc :: Elf32_Word
+shfAlloc = 0x2
+
+shfExecinstr:: Elf32_Word
+shfExecinstr = 0x4
+
+shfMascproc :: Elf32_Word
+shfMascproc = 0xf0000000
+
+shfInfoLink :: Elf32_Word
+shfInfoLink = 0x40
+
-- * Encoding functions.
elf32Addr :: ByteOrder -> Elf32_Addr -> ByteString.Builder.Builder