diff options
| -rw-r--r-- | mkelf.lua | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -30,11 +30,17 @@ local function loadconfig(fn) ELFVERSION = elf.VERSION, header = function(t) + if type(t) ~= "table" then + error("header must be a table", 2) + end header = setmetatable(t, header_mt) t:normalize() t:validate() end, segments = function(t) + if type(t) ~= "table" then + error("segments must be a table", 2) + end segments = setmetatable(t, segments_mt) t:normalize() t:validate() @@ -75,8 +81,7 @@ local function main() local out <close> = assert(io.open(outfn, "wb")) out:write(header:pack()) out:write(segments:pack(header.data, header.class)) - -- TODO finish section.pack - out:write(sections:pack(header.data)) + -- out:write(sections:pack(header.data, header.class)) end main() |
