diff options
| -rwxr-xr-x | mkelf | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -107,7 +107,8 @@ local function main() -- TODO check against headerOptions not normalized header. if header.phnum == 0 then header.phnum = #segments end if header.shnum == 0 then header.shnum = #sections end - local out <close> = assert(io.open(outfn, "wb")) + local out <close> = io.open(outfn, "wb") + if out == nil then die("failed to open %s", outfn) end out:write(elf.header.pack(header)) for _, segment in ipairs(segments) do out:write(elf.segment.pack(segment, header.data, header.class)) |
