ZDX ACADEMY

Understanding Apple Mach-O Binary Internals · Universal binaries and architecture slices

Language:English

Universal binaries: one container, multiple Mach-O images

A universal, or “fat,” binary is a container that selects among architecture-specific Mach-O slices.

The outer structure describes each slice with architecture identity, file offset, size, and alignment information. The slice itself is then parsed as an ordinary Mach-O image.

This gives you a clean two-stage parser:

  1. identify and parse the universal container;
  2. select a slice;
  3. parse that slice using the normal Mach-O parser.

Do not assume every slice is behaviorally identical. Source-level intent may be shared while compiler output, runtime calls, optimizations, pointer-authentication features, or architecture-specific assembly differ.

A useful comparison exercise is to analyze matching functions in x86_64 and arm64 slices and separate:

Course outline