zig
zig copied to clipboard
`zig objcopy`: Strip support
Ref: #9261 and #13916
Taken from GNU objcopy:
-S --strip-all Remove all symbol and relocation information
-g --strip-debug Remove all debugging symbols & sections
--strip-dwo Remove all DWO sections
--strip-unneeded Remove all symbols not needed by relocations
-N --strip-symbol <name> Do not copy symbol <name>
--strip-unneeded-symbol <name>
Do not copy symbol <name> unless needed by
relocations
For starters, having -S --strip-all and -g --strip-debug would be a great improvement.
After doing some light research on the elf file format this might be something I can do.
made a first attempt at this: https://github.com/ziglang/zig/pull/14882