diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-30 17:20:41 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-10-30 17:20:41 +0530 |
| commit | 7664fc1e915ac57aefd1e9590ab9727d40954de6 (patch) | |
| tree | 74253882687a4ab9c43ea45349e45036af3952b0 | |
| parent | fce1d5be19d81b144fdd242799dc699ee1291369 (diff) | |
Don't unconditionally overwrite phnum/shnum
Honor values given in the config.
| -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 |
