aboutsummaryrefslogtreecommitdiff
path: root/types/elf.d.lua
blob: db50eb2e0c52acc910be0a5d4401c7723d3fc9d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---@meta

local ec = require("elf.constants")

Class = ec.Class
Endian = ec.Endian
Osabi = ec.Osabi
Type = ec.Type
Machine = ec.Machine
SegmentType = ec.SegmentType
SegmentFlags = ec.SegmentFlags
SectionType = ec.SectionType
SectionFlags = ec.SectionFlags
ELFVERSION = ec.VERSION

--[[ ELF header.

There can be only one header per configuration file.
class, data, type and machine are mandatory fields while
the remaining fields are assigned defaults or computed during layout.
]]
---@param hdr HeaderOptions
function header(hdr) end

--[[ ELF segments.

The program headers are derived from these segment entries.
type field is mandatory and rest of fields are assigned defaults
or computed during layout.
]]
---@param xs SegmentOptions[]
function segments(xs) end

--[[ ELF sections.

TODO
]]
---@param xs SectionOptions[]
function sections(xs) end