aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
7 daysFormat it for visual inspection.Sunil Nimmagadda
While check, assert the header length against expected value too.
7 daysSome header methods tests.Sunil Nimmagadda
Use table.concat and try to to retain line order for quick visual check between pack() and testcases.
8 daysStart with some tests.Sunil Nimmagadda
8 daysThese need not be annotated as nodiscard.Sunil Nimmagadda
9 daysCheck close() error.Sunil Nimmagadda
While here leave a TODO to write to a tmp and atomic rename to outfn.
10 daysNeed to improve comments, wip.Sunil Nimmagadda
10 daysMake it inspection friendly.Sunil Nimmagadda
10 daysSection index in error message.Sunil Nimmagadda
10 daysMove all the validations to correct place.Sunil Nimmagadda
10 dayslayout scaffolding.Sunil Nimmagadda
Make room for layout calculations. Prioritize user specified options first for layout calculations so that layout gets first hand decision if an option was specified or missing. This makes current normalize() just a dumb defaults setter that are not layout calculated or fell through.
10 daysWill be handled in the upcoming layout function.Sunil Nimmagadda
10 daysWrap pack inside a pack and simplify error reporting.Sunil Nimmagadda
10 daysSections owns the content.Sunil Nimmagadda
10 daysClose the Lua state.Sunil Nimmagadda
11 daysShorter loop variable name. Avoid repetition.Sunil Nimmagadda
11 daysMove header check to loadconfig.Sunil Nimmagadda
11 daysPack first in memory and then write.Sunil Nimmagadda
11 daysHonor these segment options as well.Sunil Nimmagadda
11 daysPack before opening the file for write.Sunil Nimmagadda
Any pack errors shouldn't cause partial writes. Assemble binary in memory before opening the out file.
11 daysDisable this for now.Sunil Nimmagadda
11 daysMake it a proper module and call main accordingly.Sunil Nimmagadda
11 daysMake the sample recognizable.Sunil Nimmagadda
11 daysGuard against invalid class.Sunil Nimmagadda
Though, class is validated in header normalize, make the code robust if used independently in pieces.
11 daysInitialize it to nil.Sunil Nimmagadda
11 daysHonor these user specified header fields.Sunil Nimmagadda
12 daysSeparate lua code and wrapper script.Sunil Nimmagadda
12 daysemmylua_ls has trouble working without the suffix.Sunil Nimmagadda
12 daysLeave another TODO.Sunil Nimmagadda
12 daysConsistent comma.Sunil Nimmagadda
12 daysError message instead of a backtrace.Sunil Nimmagadda
12 daysLeave a TODO.Sunil Nimmagadda
12 daysMoved it to mkelf.Sunil Nimmagadda
12 daysMake mkelf an executable script.Sunil Nimmagadda
12 daysRefactor loadconfig.Sunil Nimmagadda
Split up setting haeader, segments and sections into smaller functions.
12 daysError out if multiple headers are specified.Sunil Nimmagadda
12 daysRectify check for header.Sunil Nimmagadda
12 daysRefactor normalize() to prevent in-place mutation.Sunil Nimmagadda
We would need to distinguish user configuration options from normalization. Let normalize() return a new table instead of in-place update. Split annotations into xxxOptions and xxx for header, segments and sections, delineating optional vs normalized table. Leave header, segments and sections as just a data table for now and stop trying to make them objects. Leave data alone.
12 daysLet's tune luafmt to mimic editorconfig.Sunil Nimmagadda
emmylua_ls has a built-in formatter that has slightly different defaults and lua_ls.
12 daysAnnotate these as readonly.Sunil Nimmagadda
12 daysSome negative test blocks.Sunil Nimmagadda
12 daysAnnotate this as enum as well.Sunil Nimmagadda
14 daysThis reads better.Sunil Nimmagadda
2026-10-31Rectify docstring.Sunil Nimmagadda
2026-10-31Provide an index in the error message.Sunil Nimmagadda
2026-10-30Make sure a valid header is specified.Sunil Nimmagadda
2026-10-30Better place to check them is loadconfig.Sunil Nimmagadda
Can't setmetatable() in loadconfig without the type check. These are redundant here now.
2026-10-30Don't unconditionally overwrite phnum/shnumSunil Nimmagadda
Honor values given in the config.
2026-10-30Type check individual segment/section entry.Sunil Nimmagadda
2026-10-30Some well known Machine constants.Sunil Nimmagadda
2026-10-30section: Some missing constants.Sunil Nimmagadda