From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Technique:Objective-C runtime metadata" |
|---|
| claim | "On-disk class_ro_t (64-bit): flags, instanceStart, instanceSize, reserved, ivarLayout/nonMetaclass, name, baseMethods, baseProtocols, ivars, weakIvarLayout, baseProperties; 0x48 bytes on LP64, plus an 8-byte swiftMetadataInitializer slot (0x50 bytes) when flags has RO_HAS_SWIFT_INITIALIZER (1<<6)." |
|---|
| scope | | level | "technique" |
|---|
| applies_to | "Technique:Objective-C runtime metadata" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "class_ro_t" |
|---|
| size_min | 72 |
|---|
| size_max | 80 |
|---|
| abi | "LP64" |
|---|
| fields | | name | "flags" |
|---|
| type | "uint32" |
|---|
| offset | 0 |
|---|
| notes | "RO_META 1<<0, RO_ROOT 1<<1, RO_HAS_SWIFT_INITIALIZER 1<<6" |
|---|
|
| name | "instanceStart" |
|---|
| type | "uint32" |
|---|
| offset | 4 |
|---|
|
| name | "instanceSize" |
|---|
| type | "uint32" |
|---|
| offset | 8 |
|---|
|
| name | "reserved" |
|---|
| type | "uint32" |
|---|
| offset | 12 |
|---|
| notes | "present only under __LP64__" |
|---|
|
| name | "ivarLayout" |
|---|
| type | "uint8*" |
|---|
| offset | 16 |
|---|
| notes | "union with nonMetaclass (Class) in a metaclass" |
|---|
|
| name | "name" |
|---|
| type | "char*" |
|---|
| offset | 24 |
|---|
|
| name | "baseMethods" |
|---|
| type | "method_list_t*" |
|---|
| offset | 32 |
|---|
| notes | "PointerUnion: plain list or relative_list_list_t; ptrauth-signed on arm64e" |
|---|
|
| name | "baseProtocols" |
|---|
| type | "protocol_list_t*" |
|---|
| offset | 40 |
|---|
| notes | "PointerUnion: plain or relative list list" |
|---|
|
| name | "ivars" |
|---|
| type | "ivar_list_t*" |
|---|
| offset | 48 |
|---|
|
| name | "weakIvarLayout" |
|---|
| type | "uint8*" |
|---|
| offset | 56 |
|---|
|
| name | "baseProperties" |
|---|
| type | "property_list_t*" |
|---|
| offset | 64 |
|---|
| notes | "PointerUnion: plain or relative list list" |
|---|
|
| name | "swiftMetadataInitializer" |
|---|
| type | "void*" |
|---|
| offset | 72 |
|---|
| condition | "flags & 0x40" |
|---|
| notes | "_swiftMetadataInitializer_NEVER_USE[0]; exists only when RO_HAS_SWIFT_INITIALIZER is set" |
|---|
|
|
|---|
| endianness | "native" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct class_ro_t: flags, instanceStart, instanceSize, #ifdef __LP64__ reserved, union{ivarLayout,nonMetaclass}, name, baseMethods (PointerUnion), baseProtocols, ivars, weakIvarLayout, baseProperties, then _swiftMetadataInitializer_NEVER_USE[0] 'exists only when RO_HAS_SWIFT_INITIALIZER is set'; duplicate() adds sizeof(slot) to the size when that flag is set. RO_HAS_SWIFT_INITIALIZER (1<<6) defined at line 55." |
|---|
| repo | "https://github.com/apple-oss-distributions/objc4" |
|---|
| commit | "fb265098298302243cd7eeaa1f63f0ba7786dd9a" |
|---|
| path | "runtime/objc-runtime-new.h" |
|---|
| lines | "55, 1598-1640" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T05:17:43.852Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-18T22:33:41.335Z" |
|---|
| summary | "Raise to high: re-read struct class_ro_t at the cited commit; field order flags, instanceStart, instanceSize, reserved (LP64 only), ivarLayout/nonMetaclass union, name, baseMethods, baseProtocols…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:25:48.326Z" |
|---|
| summary | "Variant left out: class_ro_t is followed by an 8-byte _swiftMetadataInitializer slot that exists only when flags has RO_HAS_SWIFT_INITIALIZER (1<<6); size is 72 without it, 80 with it. Also…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence replaced" |
|
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:52:46.282Z" |
|---|
| summary | "Byte order: in-memory runtime structure of the process (native)" |
|---|
| changed | |
|---|
|
|
|---|