From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PEF (Preferred Executable Format)" |
|---|
| claim | "A PEF section header is 28 bytes (struct '>i5I4B') at 40 + 28*i; kinds 0 code, 1 data, 2 packed data, 3 constant, 4 loader." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PEF (Preferred Executable Format)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "PEFSectionHeader" |
|---|
| size | "0x1C" |
|---|
| endianness | "big" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 4 |
|---|
| type | "int32_t" |
|---|
| name | "name_offset" |
|---|
|
| offset | "0x4" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "default_address" |
|---|
|
| offset | "0x8" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "total_size" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "unpacked_size" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "packed_size" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "container_offset" |
|---|
|
| offset | "0x18" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "section_kind" |
|---|
|
| offset | "0x19" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "share_kind" |
|---|
|
| offset | "0x1A" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "alignment" |
|---|
|
| offset | "0x1B" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "reserved" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Read: secstruct := pef[40+28*i:][:28]; totalLength at +8, containerLength at +16, containerOffset at +20, sectionKind byte 24, alignment byte 26; kinds 0-3 are code, data, pidata, rodata copied into memory (kind 2 unpacked by pidata()), kind 4 is the loader. tbxi pef_info.py line 14 gives struct '>i5I4B'. Field names other than those in the comments come from common PEF documentation." |
|---|
| repo | "elliotnunn/pef2elf" |
|---|
| commit | "31326957317e6c8685755411755bc6cbd33e9aaf" |
|---|
| path | "pef2elf.go" |
|---|
| lines | "44-73" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Section header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T03:33:25.757Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:38:05.783Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read pef2elf.go lines 44-73 at the cited commit: section struct is pef[40+28*i:][:28], totalLength at +8, containerLength +16, containerOffset +20, sectionKind byte 24, alignment byte 26; kinds 0-3 copied (2 unpacked), 4 is the loader. 4+4*5+4 = 28 matches struct '>i5I4B'." |
|---|
|
|
|---|