summaryrefslogtreecommitdiff
path: root/types/elf.d.lua
diff options
context:
space:
mode:
Diffstat (limited to 'types/elf.d.lua')
-rw-r--r--types/elf.d.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/types/elf.d.lua b/types/elf.d.lua
new file mode 100644
index 0000000..a2b774d
--- /dev/null
+++ b/types/elf.d.lua
@@ -0,0 +1,22 @@
+---@meta
+
+local elf = require("elf")
+
+-- TODO keep in sync with mkelf:loadconfig() env.
+Class = elf.Class
+Endian = elf.Endian
+Osabi = elf.Osabi
+Type = elf.Type
+Machine = elf.Machine
+SegmentType = elf.SegmentType
+SegmentFlags = elf.SegmentFlags
+ELFVERSION = elf.VERSION
+
+---@param hdr Header
+function header(hdr) end
+
+---@param xs Section[]
+function sections(xs) end
+
+---@param xs Segment[]
+function segments(xs) end