Expand description
Preferred Executable Format (PEF) parsing helpers for PowerPC CFM apps.
This module intentionally stays pure: it parses container metadata, materializes initialized section bytes, and resolves the main transition vector. Relocation application, CFM import binding, and PPC execution are separate loader phases.
Structs§
- PefEntry
Point - Main PowerPC transition vector resolved from the loader header.
- PefExported
Symbol - One symbol exported by a PEF container.
- PefExported
Symbol Hash Slot - One 4-byte export hash-table slot.
- PefExported
Symbol Key - One 4-byte export hash key.
- PefHeader
- Parsed 40-byte PEF container header.
- PefImported
Library - One 24-byte imported-library table entry from the loader section.
- PefImported
Symbol - One packed 4-byte imported-symbol table entry.
- PefInstantiated
Section - Runtime bytes for one instantiated PEF section.
- PefLoader
Header - Parsed 56-byte loader-section header.
- PefReloc
Context - Inputs for applying relocation instructions to one instantiated section.
- PefReloc
Failure - Relocation failure with the interpreter state needed for loader diagnostics.
- PefReloc
Header - One 12-byte relocation-header table entry from the loader section.
- PefResolved
Import - Name-resolved import table row, preserving the original symbol index.
- PefSection
- One entry from the PEF section header table.
Enums§
- PefReloc
Apply Error - Reasons the relocation interpreter may refuse a chunk stream.
- PefReloc
Decode Error - Decode failure for one relocation instruction.
- PefReloc
Op - One decoded PEF relocation instruction.
Constants§
- SECTION_
KIND_ CODE - SECTION_
KIND_ CONSTANT - SECTION_
KIND_ DEBUG - SECTION_
KIND_ EXECUTABLE_ DATA - SECTION_
KIND_ LOADER - SECTION_
KIND_ PATTERN_ DATA - SECTION_
KIND_ UNPACKED_ DATA
Functions§
- apply_
pef_ relocations - apply_
pef_ relocations_ detailed - data_
fork_ is_ pef - Detect a PEF container in a classic Mac data fork.
- decode_
pef_ reloc - instantiate_
pef_ section - instantiate_
pef_ sections - parse_
pef_ export_ hash_ keys - Parse the full 32-bit export hash keys from the loader section.
- parse_
pef_ export_ hash_ slots - Parse the export hash-slot table from the loader section.
- parse_
pef_ exported_ symbols - Parse every symbol exported by a PEF container.
- parse_
pef_ header - parse_
pef_ imported_ libraries - parse_
pef_ imported_ symbols - parse_
pef_ loader_ header - parse_
pef_ reloc_ headers - parse_
pef_ sections - pef_
loader_ string_ at - Read a NUL-terminated MacRoman loader string by string-table offset.
- pef_
reloc_ chunk_ stream - resolve_
pef_ imports - resolve_
pef_ main_ entry - unpack_
pef_ pattern_ data - Unpack one pattern-initialized data section’s initialized bytes.