From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Mach-O" |
|---|
| claim | "mach_header_64 is 32 bytes: magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags, reserved (all u32)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Mach-O" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "mach_header_64" |
|---|
| size | 32 |
|---|
| fields | | name | "magic" |
|---|
| offset | 0 |
|---|
| type | "u32" |
|---|
|
| name | "cputype" |
|---|
| offset | 4 |
|---|
| type | "i32" |
|---|
|
| name | "cpusubtype" |
|---|
| offset | 8 |
|---|
| type | "i32" |
|---|
|
| name | "filetype" |
|---|
| offset | 12 |
|---|
| type | "u32" |
|---|
|
| name | "ncmds" |
|---|
| offset | 16 |
|---|
| type | "u32" |
|---|
|
| name | "sizeofcmds" |
|---|
| offset | 20 |
|---|
| type | "u32" |
|---|
|
| name | "flags" |
|---|
| offset | 24 |
|---|
| type | "u32" |
|---|
|
| name | "reserved" |
|---|
| offset | 28 |
|---|
| type | "u32" |
|---|
|
|
|---|
| endianness | "mixed" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct mach_header_64" |
|---|
| repo | "https://github.com/apple-oss-distributions/xnu" |
|---|
| commit | "f6217f891ac0bb64f3d375211650a4c1ff8ca1ea" |
|---|
| path | "EXTERNAL_HEADERS/mach-o/loader.h" |
|---|
| lines | "72-81" |
|---|
|
| type | "source" |
|---|
| detail | "MH_MAGIC_64 0xfeedfacf and MH_CIGAM_64 0xcffaedfe 'NXSwapInt(MH_MAGIC_64)'" |
|---|
| repo | "https://github.com/apple-oss-distributions/xnu" |
|---|
| commit | "f6217f891ac0bb64f3d375211650a4c1ff8ca1ea" |
|---|
| path | "EXTERNAL_HEADERS/mach-o/loader.h" |
|---|
| lines | "84-85" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "mach_header_64" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T05:03:44.297Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T01:37:55.323Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched apple-oss-distributions/xnu EXTERNAL_HEADERS/mach-o/loader.h at f6217f8: struct mach_header_64 has magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags, reserved, each 4 bytes (cpu_type_t and cpu_subtype_t are int) = 32 bytes. No field missing." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:50:21.016Z" |
|---|
| summary | "Byte order mixed: fields follow the file's CPU order; magic MH_MAGIC_64 0xfeedfacf, or MH_CIGAM_64 0xcffaedfe when swapped" |
|---|
| changed | |
|---|
|
|
|---|