From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:ELF (Executable and Linkable Format)" |
|---|
| claim | "The 32-bit ELF header Elf32_Ehdr is 52 bytes: e_ident[16], uint16 e_type at 16, uint16 e_machine at 18, uint32 e_version at 20, uint32 e_entry at 24, uint32 e_phoff at 28, uint32 e_shoff at 32, uint32 e_flags at 36, then uint16 e_ehsize (52) at 40, e_phentsize (32) at 42, e_phnum at 44, e_shentsize (40) at 46, e_shnum at 48, e_shstrndx at 50." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:ELF (Executable and Linkable Format)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Elf32_Ehdr" |
|---|
| size | 52 |
|---|
| fields | | offset | 0 |
|---|
| size | 16 |
|---|
| type | "uint8[16]" |
|---|
| name | "e_ident" |
|---|
|
| offset | 16 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_type" |
|---|
|
| offset | 18 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_machine" |
|---|
|
| offset | 20 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "e_version" |
|---|
|
| offset | 24 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "e_entry" |
|---|
|
| offset | 28 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "e_phoff" |
|---|
|
| offset | 32 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "e_shoff" |
|---|
|
| offset | 36 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "e_flags" |
|---|
| notes | "ARM: EABI version in bits 24-31 (5), 0x400 hard-float, 0x200 soft-float, 0x00800000 BE8" |
|---|
|
| offset | 40 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_ehsize" |
|---|
| notes | "52" |
|---|
|
| offset | 42 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_phentsize" |
|---|
| notes | "32" |
|---|
|
| offset | 44 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_phnum" |
|---|
|
| offset | 46 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_shentsize" |
|---|
| notes | "40" |
|---|
|
| offset | 48 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_shnum" |
|---|
|
| offset | 50 |
|---|
| size | 2 |
|---|
| type | "uint16" |
|---|
| name | "e_shstrndx" |
|---|
|
|
|---|
| samples | | url | "https://github.com/eliben/pyelftools/raw/5a04389392e25d8128e1acb59828a0a85be791b1/test/testfiles_for_readelf/exe_simple32.elf" |
|---|
| sha256 | "8379584e0d9a48659027a2f0941cfb548cfb2966831be313a3467c7022b1605e" |
|---|
| note | "i386 executable: entry 0x8048300, phoff 0x34, shoff 0x1114, phnum 8, shnum 28, shstrndx 27" |
|---|
|
|
|---|
| endianness | "mixed" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Elf_Ehdr with Elf_addr/Elf_offset = 32-bit for elfclass 32" |
|---|
| repo | "https://github.com/eliben/pyelftools" |
|---|
| commit | "5a04389392e25d8128e1acb59828a0a85be791b1" |
|---|
| path | "elftools/elf/structs.py" |
|---|
| lines | "111-131, 166-190" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "elfinfo.py parses every 32-bit file of pyelftools' corpus (i386, ARM, MIPS, SPARC32PLUS, TriCore, little and big endian) with this layout" |
|---|
|
| type | "source" |
|---|
| detail | "ELFStructs(little_endian, elfclass): create_basic_structs picks ULInt* or UBInt* by little_endian" |
|---|
| repo | "https://github.com/eliben/pyelftools" |
|---|
| commit | "5a04389392e25d8128e1acb59828a0a85be791b1" |
|---|
| path | "elftools/elf/structs.py" |
|---|
| lines | "91-131" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Elf32_Ehdr" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T13:25:16.922Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:37:01.958Z" |
|---|
| summary | "Set byte order mixed: multi-byte fields follow EI_DATA (little_endian flag of ELFStructs)." |
|---|
| changed | |
|---|
|
|
|---|