diff options
| author | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-09 16:22:26 +0530 |
|---|---|---|
| committer | Sunil Nimmagadda <sunil@nimmagadda.net> | 2026-11-09 16:22:26 +0530 |
| commit | 1058681fde4d104cf01a804a488b0d94911c1240 (patch) | |
| tree | 630ec69744224a726311d8909c6df78cec6f96c7 | |
| parent | 1a3386f21b5cd7750b27885c31adf14376b06f68 (diff) | |
Consistently collect the parts.
| -rw-r--r-- | mkelf.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -143,9 +143,10 @@ end ---@param sections Section[] ---@return string local function elf_pack(header, segments, sections) + local parts = {} local ok, b = pcall(elf.header.pack, header) if not ok then error(("header: %s"):format(b), 0) end - local parts = { b } + parts[#parts + 1] = b for i, sg in ipairs(segments) do local sgok, sgb = pcall(elf.segment.pack, sg, header.data, header.class) if not sgok then error(("segment #%d: %s"):format(i, sgb), 0) end |
