Update for latest Zig
Do not use an enum for CpuSubType
Update
A simple (incomplete) Mach-O object file parser.
Requires Zig 0.12. Clone this repo and run
zig build
macho
currently only builds for macOS due to the use of mach headers which are not present on Linux. When building on a non-macOS platform, you can cross-compile for macOS with
zig build -Dtarget=x86_64-macos
You can then run macho
in a macOS emulator like Darling.
Pass the path to a valid Mach-O file as the first (and only) argument. You can use the macho
binary itself:
zig-out/bin/macho zig-out/bin/macho