diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-04 11:43:37 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-04 11:43:37 +0530 |
| commit | 5b80ffc0179faffb9b7dbb104fc6c8fb51bc9670 (patch) | |
| tree | f06a7dce666c58ee1ede170d9a02217d63aa2515 | |
| parent | 48a0d315f81784d3a12dbb6bb4870281c0db97ae (diff) | |
Error out if multiple headers are specified.
| -rw-r--r-- | mkelf.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |
