From 79f6b161f892f621a909ce1df99b3c680f3682a2 Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Fri, 23 Oct 2026 22:43:44 +0530 Subject: Refactor: Move to an elf module. While here, define a elf.d.lua to help author type check configuration file. --- types/elf.d.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 types/elf.d.lua (limited to 'types/elf.d.lua') 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 -- cgit v1.3