aboutsummaryrefslogtreecommitdiff
path: root/mkelf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mkelf.lua')
-rw-r--r--mkelf.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkelf.lua b/mkelf.lua
index 3e826fc..f348ef9 100644
--- a/mkelf.lua
+++ b/mkelf.lua
@@ -36,6 +36,9 @@ local function loadconfig(fn)
if type(t) ~= "table" then
error("header must be a table", 2)
end
+ if header ~= nil then
+ error("multiple headers are disallowed", 2)
+ end
header = elf.header.normalize(t)
end,
segments = function (t)
@@ -66,7 +69,6 @@ local function loadconfig(fn)
end,
__metatable = false,
})
- -- TODO error check for multiple headers
local chunk, err = loadfile(fn, "t", env)
if not chunk then die("%s", err) end
-- TODO sandbox against malformed configs