Executable formats

Mach-O load-command sizes

Check command-size alignment and calculate ncmds and sizeofcmds.

Your inputs

Start with an example

Your inputs stay in your browser.

Your result

Example result

How it works

Every command includes its 8-byte base fields. Sum cmdsize values and add the 28-byte or 32-byte Mach header.

Two 64-bit commands of 24 and 56 bytes give ncmds 2, sizeofcmds 80 and 112 bytes including the header.

Limits

Sizes must satisfy the selected ABI alignment. Command-specific fields and the rest of the file are not inspected.