X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FIndustryStandard%2FPeImage.h;h=1abe72971ecbfb9e8faf8098ce88f2c9d8441de9;hp=310f16b8e34f3cace31e87da835b5ed0cf72c109;hb=e1c9edd6b6ea5e78f02e382b254de40cf708d20c;hpb=14996c966991de1127fc2d6af8a08df47167b4ab
diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h
index 310f16b8e3..1abe72971e 100644
--- a/MdePkg/Include/IndustryStandard/PeImage.h
+++ b/MdePkg/Include/IndustryStandard/PeImage.h
@@ -4,17 +4,18 @@
EFI_IMAGE_NT_HEADERS64 is for PE32+.
This file is coded to the Visual Studio, Microsoft Portable Executable and
- Common Object File Format Specification, Revision 8.0 - May 16, 2006.
+ Common Object File Format Specification, Revision 8.3 - February 6, 2013.
This file also includes some definitions in PI Specification, Revision 1.0.
- Copyright (c) 2006 - 2008, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
+Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -27,26 +28,18 @@
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
-#define EFI_IMAGE_SUBSYSTEM_EFI_EFI_ROM 13
-
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 ///< defined PI Specification, 1.0
//
// PE32+ Machine type for EFI images
//
-#define IMAGE_FILE_MACHINE_I386 0x014c
-#define IMAGE_FILE_MACHINE_IA64 0x0200
-#define IMAGE_FILE_MACHINE_EBC 0x0EBC
-#define IMAGE_FILE_MACHINE_X64 0x8664
-//
-// Support old names for backward compatible
-//
-#define EFI_IMAGE_MACHINE_IA32 IMAGE_FILE_MACHINE_I386
-#define EFI_IMAGE_MACHINE_IA64 IMAGE_FILE_MACHINE_IA64
-#define EFI_IMAGE_MACHINE_IPF IMAGE_FILE_MACHINE_IA64
-#define EFI_IMAGE_MACHINE_EBC IMAGE_FILE_MACHINE_EBC
-#define EFI_IMAGE_MACHINE_X64 IMAGE_FILE_MACHINE_X64
+#define IMAGE_FILE_MACHINE_I386 0x014c
+#define IMAGE_FILE_MACHINE_IA64 0x0200
+#define IMAGE_FILE_MACHINE_EBC 0x0EBC
+#define IMAGE_FILE_MACHINE_X64 0x8664
+#define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED 0x01c2
+#define IMAGE_FILE_MACHINE_ARM64 0xAA64
//
// EXE file formats
@@ -61,29 +54,29 @@
/// under DOS it can print an error message.
///
typedef struct {
- UINT16 e_magic; ///< Magic number
- UINT16 e_cblp; ///< Bytes on last page of file
- UINT16 e_cp; ///< Pages in file
- UINT16 e_crlc; ///< Relocations
- UINT16 e_cparhdr; ///< Size of header in paragraphs
- UINT16 e_minalloc; ///< Minimum extra paragraphs needed
- UINT16 e_maxalloc; ///< Maximum extra paragraphs needed
- UINT16 e_ss; ///< Initial (relative) SS value
- UINT16 e_sp; ///< Initial SP value
- UINT16 e_csum; ///< Checksum
- UINT16 e_ip; ///< Initial IP value
- UINT16 e_cs; ///< Initial (relative) CS value
- UINT16 e_lfarlc; ///< File address of relocation table
- UINT16 e_ovno; ///< Overlay number
- UINT16 e_res[4]; ///< Reserved words
- UINT16 e_oemid; ///< OEM identifier (for e_oeminfo)
- UINT16 e_oeminfo; ///< OEM information; e_oemid specific
- UINT16 e_res2[10]; ///< Reserved words
- UINT32 e_lfanew; ///< File address of new exe header
+ UINT16 e_magic; ///< Magic number.
+ UINT16 e_cblp; ///< Bytes on last page of file.
+ UINT16 e_cp; ///< Pages in file.
+ UINT16 e_crlc; ///< Relocations.
+ UINT16 e_cparhdr; ///< Size of header in paragraphs.
+ UINT16 e_minalloc; ///< Minimum extra paragraphs needed.
+ UINT16 e_maxalloc; ///< Maximum extra paragraphs needed.
+ UINT16 e_ss; ///< Initial (relative) SS value.
+ UINT16 e_sp; ///< Initial SP value.
+ UINT16 e_csum; ///< Checksum.
+ UINT16 e_ip; ///< Initial IP value.
+ UINT16 e_cs; ///< Initial (relative) CS value.
+ UINT16 e_lfarlc; ///< File address of relocation table.
+ UINT16 e_ovno; ///< Overlay number.
+ UINT16 e_res[4]; ///< Reserved words.
+ UINT16 e_oemid; ///< OEM identifier (for e_oeminfo).
+ UINT16 e_oeminfo; ///< OEM information; e_oemid specific.
+ UINT16 e_res2[10]; ///< Reserved words.
+ UINT32 e_lfanew; ///< File address of new exe header.
} EFI_IMAGE_DOS_HEADER;
///
-/// COFF File Header (Object and Image)
+/// COFF File Header (Object and Image).
///
typedef struct {
UINT16 Machine;
@@ -96,7 +89,7 @@ typedef struct {
} EFI_IMAGE_FILE_HEADER;
///
-/// Size of EFI_IMAGE_FILE_HEADER
+/// Size of EFI_IMAGE_FILE_HEADER.
///
#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
@@ -109,25 +102,13 @@ typedef struct {
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED BIT3 ///< 0x0008 Local symbols stripped from file.
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO BIT7 ///< 0x0080 Bytes of machine word are reversed.
#define EFI_IMAGE_FILE_32BIT_MACHINE BIT8 ///< 0x0100 32 bit word machine.
-#define EFI_IMAGE_FILE_DEBUG_STRIPPED BIT9 ///< 0x0200 Debugging info stripped from file in .DBG file
+#define EFI_IMAGE_FILE_DEBUG_STRIPPED BIT9 ///< 0x0200 Debugging info stripped from file in .DBG file.
#define EFI_IMAGE_FILE_SYSTEM BIT12 ///< 0x1000 System File.
#define EFI_IMAGE_FILE_DLL BIT13 ///< 0x2000 File is a DLL.
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI BIT15 ///< 0x8000 Bytes of machine word are reversed.
-//
-// Other Machine Types
-//
-#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0 ///< Any machine type
-#define EFI_IMAGE_FILE_MACHINE_I386 0x14c ///< Intel 386.
-#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 ///< MIPS* little-endian, 0540 big-endian
-#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 ///< MIPS* little-endian
-#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 ///< IBM* PowerPC Little-Endian
-//
-// * Other names and brands may be claimed as the property of others.
-//
-
///
-/// Header Data Directories
+/// Header Data Directories.
///
typedef struct {
UINT32 VirtualAddress;
@@ -160,7 +141,7 @@ typedef struct {
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
///
-/// Optional Header Standard Fields for PE32
+/// Optional Header Standard Fields for PE32.
///
typedef struct {
///
@@ -174,7 +155,7 @@ typedef struct {
UINT32 SizeOfUninitializedData;
UINT32 AddressOfEntryPoint;
UINT32 BaseOfCode;
- UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+
+ UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+.
///
/// Optional Header Windows-Specific Fields.
///
@@ -211,7 +192,7 @@ typedef struct {
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
///
-/// Optional Header Standard Fields for PE32+
+/// Optional Header Standard Fields for PE32+.
///
typedef struct {
///
@@ -255,8 +236,7 @@ typedef struct {
///
/// @attention
-/// EFI_IMAGE_NT_HEADERS32 and EFI_IMAGE_HEADERS64 are for use ONLY
-/// by tools. All proper EFI code MUST use EFI_IMAGE_NT_HEADERS ONLY!!!
+/// EFI_IMAGE_NT_HEADERS32 is for use ONLY by tools.
///
typedef struct {
UINT32 Signature;
@@ -266,6 +246,10 @@ typedef struct {
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)
+///
+/// @attention
+/// EFI_IMAGE_HEADERS64 is for use ONLY by tools.
+///
typedef struct {
UINT32 Signature;
EFI_IMAGE_FILE_HEADER FileHeader;
@@ -274,67 +258,6 @@ typedef struct {
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
-
-///
-/// Processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
-/// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
-/// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
-///
-#if defined (MDE_CPU_IA32)
-
-#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
- (((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
-
-#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
-
-typedef EFI_IMAGE_NT_HEADERS32 EFI_IMAGE_NT_HEADERS;
-
-#elif defined (MDE_CPU_IPF)
-
-#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
- (((Machine) == EFI_IMAGE_MACHINE_IPF) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
-
-#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
-
-typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
-
-#elif defined (MDE_CPU_X64)
-
-#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
- (((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC))
-
-#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
-
-typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
-
-#elif defined (MDE_CPU_EBC)
-
-///
-/// This is just to make sure you can cross compile with the EBC compiiler.
-/// It does not make sense to have a PE loader coded in EBC. You need to
-/// understand the basic
-///
-#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)
-
-#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
-
-typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
-
-#else
-#error Unknown Processor Type
-#endif
-
-
-#define EFI_IMAGE_FIRST_SECTION(ntheader) \
- ( \
- (EFI_IMAGE_SECTION_HEADER *) \
- ( \
- (UINT32) ntheader + \
- FIELD_OFFSET (EFI_IMAGE_NT_HEADERS, OptionalHeader) + \
- ((EFI_IMAGE_NT_HEADERS *) (ntheader))->FileHeader.SizeOfOptionalHeader \
- ) \
- )
-
//
// Other Windows Subsystem Values
//
@@ -346,12 +269,12 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7
///
-/// Section header format.
+/// Length of ShortName.
///
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
///
-/// Section Table, this table immediately follows the optional header
+/// Section Table. This table immediately follows the optional header.
///
typedef struct {
UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
@@ -370,7 +293,7 @@ typedef struct {
} EFI_IMAGE_SECTION_HEADER;
///
-/// Size of EFI_IMAGE_SECTION_HEADER
+/// Size of EFI_IMAGE_SECTION_HEADER.
///
#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
@@ -404,7 +327,7 @@ typedef struct {
#define EFI_IMAGE_SCN_MEM_WRITE BIT31 ///< 0x80000000
///
-/// Size of a Symbol Table Record
+/// Size of a Symbol Table Record.
///
#define EFI_IMAGE_SIZEOF_SYMBOL 18
@@ -517,15 +440,15 @@ typedef struct {
//
// I386 relocation types.
//
-#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary
-#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address
-#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address
-#define EFI_IMAGE_REL_I386_DIR32 0x0006 ///< Direct 32-bit reference to the symbols virtual address
-#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included
-#define EFI_IMAGE_REL_I386_SEG12 0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
+#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary.
+#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address.
+#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address.
+#define EFI_IMAGE_REL_I386_DIR32 0x0006 ///< Direct 32-bit reference to the symbols virtual address.
+#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included.
+#define EFI_IMAGE_REL_I386_SEG12 0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address.
#define EFI_IMAGE_REL_I386_SECTION 0x000A
#define EFI_IMAGE_REL_I386_SECREL 0x000B
-#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address
+#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address.
//
// x64 processor relocation types.
@@ -557,7 +480,7 @@ typedef struct {
} EFI_IMAGE_BASE_RELOCATION;
///
-/// Size of EFI_IMAGE_BASE_RELOCATION
+/// Size of EFI_IMAGE_BASE_RELOCATION.
///
#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
@@ -570,6 +493,8 @@ typedef struct {
#define EFI_IMAGE_REL_BASED_HIGHLOW 3
#define EFI_IMAGE_REL_BASED_HIGHADJ 4
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
+#define EFI_IMAGE_REL_BASED_ARM_MOV32A 5
+#define EFI_IMAGE_REL_BASED_ARM_MOV32T 7
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16 9
#define EFI_IMAGE_REL_BASED_DIR64 10
@@ -579,14 +504,14 @@ typedef struct {
///
typedef struct {
union {
- UINT32 SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
- UINT32 VirtualAddress; // Virtual address of line number.
+ UINT32 SymbolTableIndex; ///< Symbol table index of function name if Linenumber is 0.
+ UINT32 VirtualAddress; ///< Virtual address of line number.
} Type;
- UINT16 Linenumber; // Line number.
+ UINT16 Linenumber; ///< Line number.
} EFI_IMAGE_LINENUMBER;
///
-/// Size of EFI_IMAGE_LINENUMBER
+/// Size of EFI_IMAGE_LINENUMBER.
///
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
@@ -610,11 +535,11 @@ typedef struct {
UINT8 GroupID[6]; ///< File member group id - decimal.
UINT8 Mode[8]; ///< File member mode - octal.
UINT8 Size[10]; ///< File member size - decimal.
- UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A)
+ UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A).
} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
///
-/// Size of EFI_IMAGE_ARCHIVE_MEMBER_HEADER
+/// Size of EFI_IMAGE_ARCHIVE_MEMBER_HEADER.
///
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
@@ -624,7 +549,7 @@ typedef struct {
//
///
-/// Export Directory Table
+/// Export Directory Table.
///
typedef struct {
UINT32 Characteristics;
@@ -641,7 +566,7 @@ typedef struct {
} EFI_IMAGE_EXPORT_DIRECTORY;
///
-/// Hint/Name Table
+/// Hint/Name Table.
///
typedef struct {
UINT16 Hint;
@@ -649,7 +574,7 @@ typedef struct {
} EFI_IMAGE_IMPORT_BY_NAME;
///
-/// Import Address Table RVA (Thunk Table)
+/// Import Address Table RVA (Thunk Table).
///
typedef struct {
union {
@@ -659,7 +584,7 @@ typedef struct {
} u1;
} EFI_IMAGE_THUNK_DATA;
-#define EFI_IMAGE_ORDINAL_FLAG BIT31 ///< Flag for PE32
+#define EFI_IMAGE_ORDINAL_FLAG BIT31 ///< Flag for PE32.
#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
#define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
@@ -676,7 +601,7 @@ typedef struct {
///
-/// Debug Direcotry Format
+/// Debug Directory Format.
///
typedef struct {
UINT32 Characteristics;
@@ -685,14 +610,14 @@ typedef struct {
UINT16 MinorVersion;
UINT32 Type;
UINT32 SizeOfData;
- UINT32 RVA; ///< The address of the debug data when loaded, relative to the image base
- UINT32 FileOffset; ///< The file pointer to the debug data
+ UINT32 RVA; ///< The address of the debug data when loaded, relative to the image base.
+ UINT32 FileOffset; ///< The file pointer to the debug data.
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
-#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information
+#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information.
///
-/// Debug Data Structure defined in Microsoft C++
+/// Debug Data Structure defined in Microsoft C++.
///
#define CODEVIEW_SIGNATURE_NB10 SIGNATURE_32('N', 'B', '1', '0')
typedef struct {
@@ -706,11 +631,11 @@ typedef struct {
} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;
///
-/// Debug Data Structure defined in Microsoft C++
+/// Debug Data Structure defined in Microsoft C++.
///
#define CODEVIEW_SIGNATURE_RSDS SIGNATURE_32('R', 'S', 'D', 'S')
typedef struct {
- UINT32 Signature; ///< "RSDS"
+ UINT32 Signature; ///< "RSDS".
UINT32 Unknown;
UINT32 Unknown2;
UINT32 Unknown3;
@@ -721,19 +646,85 @@ typedef struct {
//
} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
+
+///
+/// Debug Data Structure defined by Apple Mach-O to Coff utility.
+///
+#define CODEVIEW_SIGNATURE_MTOC SIGNATURE_32('M', 'T', 'O', 'C')
+typedef struct {
+ UINT32 Signature; ///< "MTOC".
+ GUID MachOUuid;
+ //
+ // Filename of .DLL (Mach-O with debug info) goes here
+ //
+} EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY;
+
+///
+/// Resource format.
+///
+typedef struct {
+ UINT32 Characteristics;
+ UINT32 TimeDateStamp;
+ UINT16 MajorVersion;
+ UINT16 MinorVersion;
+ UINT16 NumberOfNamedEntries;
+ UINT16 NumberOfIdEntries;
+ //
+ // Array of EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY entries goes here.
+ //
+} EFI_IMAGE_RESOURCE_DIRECTORY;
+
+///
+/// Resource directory entry format.
+///
+typedef struct {
+ union {
+ struct {
+ UINT32 NameOffset:31;
+ UINT32 NameIsString:1;
+ } s;
+ UINT32 Id;
+ } u1;
+ union {
+ UINT32 OffsetToData;
+ struct {
+ UINT32 OffsetToDirectory:31;
+ UINT32 DataIsDirectory:1;
+ } s;
+ } u2;
+} EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY;
+
+///
+/// Resource directory entry for string.
+///
+typedef struct {
+ UINT16 Length;
+ CHAR16 String[1];
+} EFI_IMAGE_RESOURCE_DIRECTORY_STRING;
+
+///
+/// Resource directory entry for data array.
+///
+typedef struct {
+ UINT32 OffsetToData;
+ UINT32 Size;
+ UINT32 CodePage;
+ UINT32 Reserved;
+} EFI_IMAGE_RESOURCE_DATA_ENTRY;
+
///
-/// Header format for TE images, defined in PI Specification, 1.0
+/// Header format for TE images, defined in the PI Specification, 1.0.
///
typedef struct {
- UINT16 Signature; ///< signature for TE format = "VZ"
- UINT16 Machine; ///< from the original file header
- UINT8 NumberOfSections; ///< from the original file header
- UINT8 Subsystem; ///< from original optional header
- UINT16 StrippedSize; ///< how many bytes we removed from the header
- UINT32 AddressOfEntryPoint; ///< offset to entry point -- from original optional header
- UINT32 BaseOfCode; ///< from original image -- required for ITP debug
- UINT64 ImageBase; ///< from original file header
- EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; ///< only base relocation and debug directory
+ UINT16 Signature; ///< The signature for TE format = "VZ".
+ UINT16 Machine; ///< From the original file header.
+ UINT8 NumberOfSections; ///< From the original file header.
+ UINT8 Subsystem; ///< From original optional header.
+ UINT16 StrippedSize; ///< Number of bytes we removed from the header.
+ UINT32 AddressOfEntryPoint; ///< Offset to entry point -- from original optional header.
+ UINT32 BaseOfCode; ///< From original image -- required for ITP debug.
+ UINT64 ImageBase; ///< From original file header.
+ EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; ///< Only base relocation and debug directory.
} EFI_TE_IMAGE_HEADER;
@@ -747,7 +738,7 @@ typedef struct {
///
-/// Union of PE32, PE32+, and TE headers
+/// Union of PE32, PE32+, and TE headers.
///
typedef union {
EFI_IMAGE_NT_HEADERS32 Pe32;