diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-29 18:47:02 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-29 18:47:02 +0530 |
| commit | fb9303f07290e6d62859b9da05f58f0b5aa2b64e (patch) | |
| tree | 579e1dbf23b846aaa0bc0e54035361c1405645ef /elf/constants.lua | |
| parent | 24bdc639027ac9b663fb127fba82eba232c30cab (diff) | |
Define some section related enums.
Diffstat (limited to 'elf/constants.lua')
| -rw-r--r-- | elf/constants.lua | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/elf/constants.lua b/elf/constants.lua index 0a7c735..859440e 100644 --- a/elf/constants.lua +++ b/elf/constants.lua @@ -98,4 +98,47 @@ M.SegmentFlags = { r = 0x4, } +---@enum SectionType +M.SectionType = { + null = 0x0, + progbits = 0x1, + symtab = 0x2, + strtab = 0x3, + rela = 0x4, + hash = 0x5, + dynamic = 0x6, + note = 0x7, + nobits = 0x8, + rel = 0x9, + shlib = 0xa, + dynsym = 0xb, + init_array = 0xe, + fini_array = 0xf, + preinit_array = 0x10, + group = 0x11, + symtab_shndx = 0x12, + num = 0x13, + loos = 0x60000000, + hios = 0x6fffffff, + -- TODO +} + +---@enum SectionFlags +M.SectionFlags = { + write = 0x1, + alloc = 0x2, + execinstr = 0x4, + merge = 0x10, + strings = 0x20, + info_link = 0x40, + link_order = 0x80, + os_nonconforming = 0x100, + group = 0x200, + tls = 0x400, + maskos = 0x0ff00000, + maskproc = 0xf0000000, + ordered = 0x4000000, + exclude = 0x8000000, +} + return M |
