zig icon indicating copy to clipboard operation
zig copied to clipboard

`zig objcopy`: Strip support

Open Ristovski opened this issue 3 years ago • 2 comments

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.

Ristovski avatar Dec 13 '22 18:12 Ristovski

After doing some light research on the elf file format this might be something I can do.

cjiupar avatar Dec 19 '22 17:12 cjiupar

made a first attempt at this: https://github.com/ziglang/zig/pull/14882

xxxbxxx avatar Mar 11 '23 16:03 xxxbxxx