From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:ELF (Executable and Linkable Format)" |
|---|
| claim | "A 32-bit program header Elf32_Phdr is 32 bytes of uint32: p_type, p_offset, p_vaddr, p_paddr, p_filesz, p_memsz, p_flags, p_align (p_flags is seventh, unlike Elf64_Phdr where it is second)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:ELF (Executable and Linkable Format)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "Elf32_Phdr" |
|---|
| size | 32 |
|---|
| fields | | offset | 0 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_type" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_offset" |
|---|
|
| offset | 8 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_vaddr" |
|---|
|
| offset | 12 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_paddr" |
|---|
|
| offset | 16 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_filesz" |
|---|
|
| offset | 20 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_memsz" |
|---|
|
| offset | 24 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_flags" |
|---|
| bits | |
|---|
|
| offset | 28 |
|---|
| size | 4 |
|---|
| type | "uint32" |
|---|
| name | "p_align" |
|---|
|
|
|---|
| endianness | "mixed" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "_create_phdr, elfclass 32 branch" |
|---|
| repo | "https://github.com/eliben/pyelftools" |
|---|
| commit | "5a04389392e25d8128e1acb59828a0a85be791b1" |
|---|
| path | "elftools/elf/structs.py" |
|---|
| lines | "209-219" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "exe_simple32.elf: first entry at 0x34 is PT_PHDR (06 00 00 00) with p_offset 0x34 and p_vaddr 0x08048034; the PT_LOAD segments cover e_entry 0x8048300" |
|---|
|
| 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_Phdr" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T13:25:17.098Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:37:02.051Z" |
|---|
| summary | "Set byte order mixed: multi-byte fields follow EI_DATA (little_endian flag of ELFStructs)." |
|---|
| changed | |
|---|
|
|
|---|