Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubkon/zacho
Zig's Mach-O parser
https://github.com/kubkon/zacho
zig zig-package
Last synced: 3 months ago
JSON representation
Zig's Mach-O parser
- Host: GitHub
- URL: https://github.com/kubkon/zacho
- Owner: kubkon
- License: mit
- Created: 2020-08-26T19:38:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T04:46:30.000Z (4 months ago)
- Last Synced: 2024-10-15T02:43:25.963Z (3 months ago)
- Topics: zig, zig-package
- Language: Zig
- Homepage:
- Size: 183 KB
- Stars: 37
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - zacho🗒️Zig's Mach-O parser
README
# zacho
...or Zig's Mach-O parser. This project started off as a dummy scratchpad for reinforcing my
understanding of the Mach-O file format while I was working on the Zig's stage2 Mach-O linker
(I still am working on it, in case anyone was asking).My current vision for `zacho` is for it to be a cross-platform version of `otool` and `pagestuff`
macOS utilities. These seem to be very useful when battling the Darwin kernel and `dyld` when those
refuse to load your hand-crafter binary, or you just like looking at Mach-O dissected output.## Usage
```
Usage: zacho [options] fileGeneral options:
-c, --code-signature Print the contents of code signature (if any)
-d, --dyld-info Print the contents of dyld rebase and bind opcodes
-e, --exports-trie Print export trie (if any)
-h, --header Print the Mach-O header
-i, --indirect-symbol-table Print the indirect symbol table
-l, --load-commands Print load commands
-r, --relocations Print relocation entries (if any)
-s, --symbol-table Print the symbol table
-u, --unwind-info Print the contents of (compact) unwind info section (if any)
-v, --verbose Print more detailed info for each flag
--archive-index Print archive index (if any)
--string-table Print the string table
--data-in-code Print data-in-code entries (if any)
--hex-dump=[name] Dump section contents as bytes
--string-dump=[name] Dump section contents as strings
--verify-memory-layout Print virtual memory layout and verify there is no overlap
--help Display this help and exit
```## Building from source
Building from source requires [Zig nightly](https://ziglang.org/download/).
```
$ git clone https://github.com/kubkon/zacho.git
$ zig build
```