Format:TE image
| Magic | VZ (56 5A) at offset 0 |
|---|---|
| Extensions | none (FFS section 0x12) |
| Endianness | little |
| License | BSD-2-Clause-Patent (edk2 headers) |
| On this wiki | Facts · Code · Notes · Topics |
The Terse Executable, a stripped PE header ('VZ') used in UEFI PEI firmware modules to save flash space; the section content of FFS section type 0x12.
Overview
PI firmware replaces the DOS and PE headers of an image with a 40-byte TE header to save space. Code and section table are otherwise a normal PE image (see Format:PE (Portable Executable)). Appears as section type 0x12 in a file of a Format:UEFI firmware volume (PI).
The layout is attached as a struct fact (edk2 PeImage.h lines 775-796). The DataDirectory has only two entries, index 0 base relocation and index 1 debug; the TE signature 'VZ' is 56 5A in the file.
Header (EFI_TE_IMAGE_HEADER, 40 bytes)
| Offset | Size | Field |
|---|---|---|
| 0 | 2 | Signature VZ (0x5A56)
|
| 2 | 2 | Machine (from the PE file header, e.g. 0x8664 x64, 0x014C i386, 0xAA64 ARM64) |
| 4 | 1 | NumberOfSections |
| 5 | 1 | Subsystem |
| 6 | 2 | StrippedSize: bytes removed from the original headers |
| 8 | 4 | AddressOfEntryPoint |
| 12 | 4 | BaseOfCode |
| 16 | 8 | ImageBase |
| 24 | 16 | DataDirectory[2]: base relocation and debug directory (RVA, size) |
The section table follows at offset 40. To turn an RVA into a file offset subtract StrippedSize and add 40 (so the TE file offset of an RVA is rva - StrippedSize + 40, after section mapping). When loading in a disassembler, set the image base to ImageBase and adjust addresses by that StrippedSize delta.
Source: edk2 MdePkg/Include/IndustryStandard/PeImage.h.
Code & repositories
- https://github.com/tianocore/edk2 @
c1415771ac592ad8509351c46cd3cda4f38d7d52· license: BSD-2-Clause (read from License-History.txt; GitHub's detector did not classify it)
EDK2 reference headers for PI firmware volumes, FFS, sections, TE and capsules (MdePkg/Include/Pi, Uefi, IndustryStandard/PeImage.h)
Tested on: source read, not run: source read · checked 2026-10-18; last activity 2026-10-16