Mach-O Reference
LC_UUIDLC_UUID — the build's unique identifier
LC_UUID stamps a Mach-O image with a 128-bit identifier unique to that exact build. It is what ties a crash report or dSYM back to the binary it came from.
What it is
LC_UUID is a tiny load command carrying a
128-bit UUID that the linker generates for each build. Change a single byte
of input and the UUID changes; rebuild bit-for-bit identically and it stays the
same. It uniquely names that exact image.
Fields
| Field | Meaning |
|---|---|
cmd | LC_UUID (0x1b). |
cmdsize | 24 bytes. |
uuid | 16 raw bytes, shown as 8426AD72-1580-30BD-B8A2-0A05B4672A9F. |
Each architecture in a universal binary has its own
LC_UUID, so a fat file carries one UUID per slice.
Why it matters
The UUID is the join key for debugging. A .dSYM debug bundle records the UUID
of the binary it describes, and a crash report records the UUID of each image
that was loaded. Symbolication works by matching those UUIDs: the right debug
symbols are the ones whose UUID equals the crashing image's. If they differ by
even one bit, the symbol file is for a different build and the addresses will
not line up.
It also appears in the code signature: the signed content covers the whole image, so the UUID is implicitly part of what is signed. Two files with the same UUID are the same build; two with different UUIDs are not, however similar they look.