You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(as a side note, it is soo nice to experience the 'reusable' part of the zig tagline: being able to actually just grab the objcopy.zig file from the compiler source tree and run it as-is in an other context, no fiddling with include paths or whatever. lovely!)
My goal is to support the most common operations on the most common object formats.
In other words: support adding/removing/configuring/compressing sections and symbols for ELF, COFF, and MachO objects.
Conversion between object formats (besides "raw" formats like binary, ihex, etc.) is intentionally unsupported. This feature is rarely used and requires a huge amount of complexity in return. GNU is the only vendor that implements it and built a dedicated library to do it. LLVM drops this feature as well, although it does support converting between ELF types (endianness, architecture, 32/64bit). Zig users should either compile with the desired -ofmt or depend on GNU objcopy.
anyone actually working on this one? debating taking a look at it (esp given the workarounds posted) given this issue is blocking my project from updating past 0.14.1
if no, what exactly is needed here? "sweaty" is far from descriptive and the issue gives no details on what would be required specifically
Activity
objcopy: delete most of it
objcopy: delete most of it
objcopy: delete most of it
objcopy: delete most of it
objcopy: delete most of it
xxxbxxx commentedon Aug 25, 2025
In case it is useful to someone other than me:
I've ported the old 0.14.1 code to 0.15.1 in this package:
https://codeberg.org/xbx/cc_helper
(as a side note, it is soo nice to experience the 'reusable' part of the zig tagline: being able to actually just grab the objcopy.zig file from the compiler source tree and run it as-is in an other context, no fiddling with include paths or whatever. lovely!)
Parzival-3141 commentedon Sep 16, 2025
I've started work on this here.
My goal is to support the most common operations on the most common object formats.
In other words: support adding/removing/configuring/compressing sections and symbols for ELF, COFF, and MachO objects.
Conversion between object formats (besides "raw" formats like
binary,ihex, etc.) is intentionally unsupported. This feature is rarely used and requires a huge amount of complexity in return. GNU is the only vendor that implements it and built a dedicated library to do it. LLVM drops this feature as well, although it does support converting between ELF types (endianness, architecture, 32/64bit). Zig users should either compile with the desired-ofmtor depend on GNUobjcopy.Hopefully that's sweaty enough.
Khitiara commentedon Oct 12, 2025
anyone actually working on this one? debating taking a look at it (esp given the workarounds posted) given this issue is blocking my project from updating past 0.14.1
if no, what exactly is needed here? "sweaty" is far from descriptive and the issue gives no details on what would be required specifically
Parzival-3141 commentedon Oct 14, 2025
@Khitiara I'm still working on this, I've just been busy these past couple weeks. What's your use-case? I'd be happy to collaborate!
Khitiara commentedon Oct 14, 2025
@Parzival-3141 my use case is the split debug file option - turning one elf with debug info into a stripped binary and a separate debug info file
zig objcopy: Strip support #13928 as a duplicate of this issueandrewrk commentedon Nov 26, 2026
closed as of https://codeberg.org/ziglang/zig/commit/da5ff725275edd181c90f461f4f21a55d65ea3b0
andrewrk commentedon Nov 26, 2026
oops I mixed up objcopy and objdump 🙃