From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:LE and LX (Linear Executable)" |
|---|
| claim | "The LE/LX header is 196 bytes: signature at 0, flags at 0x10, num_pages at 0x14, EIP at 0x1C, page_size at 0x28, objtab_off at 0x40, objmap_off at 0x48, fixpage_off at 0x68, fixrec_off at 0x6C, page_off at 0x80." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:LE and LX (Linear Executable)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "os2_flat_header" |
|---|
| size | 196 |
|---|
| fields | | name | "signature" |
|---|
| offset | 0 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| notes | "'LE' or 'LX'" |
|---|
|
| name | "byte_order" |
|---|
| offset | 2 |
|---|
| size | 1 |
|---|
| type | "uint8" |
|---|
|
| name | "word_order" |
|---|
| offset | 3 |
|---|
| size | 1 |
|---|
| type | "uint8" |
|---|
|
| name | "level" |
|---|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "cpu_type" |
|---|
| offset | 8 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| notes | "1 286, 2 386, 3 486" |
|---|
|
| name | "os_type" |
|---|
| offset | 10 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| notes | "1 OS/2, 4 Windows 386" |
|---|
|
| name | "version" |
|---|
| offset | 12 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "flags" |
|---|
| offset | 16 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "num_pages" |
|---|
| offset | 20 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "start_obj" |
|---|
| offset | 24 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "eip" |
|---|
| offset | 28 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "stack_obj" |
|---|
| offset | 32 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "esp" |
|---|
| offset | 36 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "page_size" |
|---|
| offset | 40 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "last_page_or_page_shift" |
|---|
| offset | 44 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| notes | "LE: bytes on last page; LX: page shift" |
|---|
|
| name | "fixup_size" |
|---|
| offset | 48 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "objtab_off" |
|---|
| offset | 64 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "num_objects" |
|---|
| offset | 68 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "objmap_off" |
|---|
| offset | 72 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "fixpage_off" |
|---|
| offset | 104 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "fixrec_off" |
|---|
| offset | 108 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "page_off" |
|---|
| offset | 128 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "nonres_off" |
|---|
| offset | 136 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "debug_off" |
|---|
| offset | 152 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "heapsize" |
|---|
| offset | 168 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
| name | "stacksize" |
|---|
| offset | 172 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct os2_flat_header, 1-byte packing; offsets counted from the field order (fields not listed here are in between)" |
|---|
| repo | "open-watcom/open-watcom-v2" |
|---|
| commit | "96b007f094bb21c6108b2793706fa298da59fc5e" |
|---|
| path | "bld/watcom/h/exeflat.h" |
|---|
|
| type | "source" |
|---|
| detail | "Recounted every field size in os2_flat_header; listed offsets and the 196-byte total match" |
|---|
| repo | "https://github.com/open-watcom/open-watcom-v2" |
|---|
| commit | "96b007f094bb21c6108b2793706fa298da59fc5e" |
|---|
| path | "bld/watcom/h/exeflat.h" |
|---|
| lines | "44-105" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T12:40:46.980Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T21:37:18.606Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read open-watcom-v2 bld/watcom/h/exeflat.h at 96b007f lines 44-105 and summed the field sizes by hand: objtab_off 64, num_objects 68, objmap_off 72, fixpage_off 104, fixrec_off 108, page_off 128, nonres_off 136, debug_off 152, heapsize 168, stacksize 172, fields end at 176 plus the 20-byte reserved pad = 196. All listed offsets match." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-18T21:37:18.468Z" |
|---|
| summary | "Offsets recounted from the Open Watcom header: all match; raise to high" |
|---|
| changed | |
|---|
|
|
|---|