diff options
| -rw-r--r-- | mkelf.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -96,8 +96,8 @@ local function main() i = i + 1 end local header, segments, sections = loadconfig(infn) - header.phnum = #segments - header.shnum = #sections + 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")) out:write(header:pack()) for _, segment in ipairs(segments) do |
