diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-04 18:10:09 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-04 18:10:09 +0530 |
| commit | 486018285fa286d9b98a36e58859d6f0360d2b36 (patch) | |
| tree | f4281f86be99382490946585f3bfd29cfe9a58f5 | |
| parent | 9e521e3d92d896478e518e3723c649e652a0ec72 (diff) | |
Error message instead of a backtrace.
| -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)) |
