MachO-Reader

Playground project to learn more about the Mach-O file format.

How to run

swift run MachO-Reader <path-to-binary>

You should see a similar output: image

Sources

  1. Parsing Mach-O Files
  2. llios
  3. Hello, Mach-O
  4. Swift metadata
  5. Machismo

Source files

Mach-O implementation details can be in Xcode’s folder. In my case this is the path:

/Applications/Xcode-System.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

These are some useful relative paths:

  1. /usr/include/mach-o/loader.h
  2. /usr/include/mach/vm_prot.h

GitHub

View Github