MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PE_COFF_LOADER_IMAGE_CONTEXT Struct Reference

Data Fields

PHYSICAL_ADDRESS ImageAddress
 
UINT64 ImageSize
 
PHYSICAL_ADDRESS DestinationAddress
 
PHYSICAL_ADDRESS EntryPoint
 
PE_COFF_LOADER_READ_FILE ImageRead
 
VOIDHandle
 
VOIDFixupData
 
UINT32 SectionAlignment
 
UINT32 PeCoffHeaderOffset
 
UINT32 DebugDirectoryEntryRva
 
VOIDCodeView
 
CHAR8PdbPointer
 
UINTN SizeOfHeaders
 
UINT32 ImageCodeMemoryType
 
UINT32 ImageDataMemoryType
 
UINT32 ImageError
 
UINTN FixupDataSize
 
UINT16 Machine
 
UINT16 ImageType
 
BOOLEAN RelocationsStripped
 
BOOLEAN IsTeImage
 
PHYSICAL_ADDRESS HiiResourceData
 
UINT64 Context
 

Detailed Description

The context structure used while PE/COFF image is being loaded and relocated.

Field Documentation

VOID* PE_COFF_LOADER_IMAGE_CONTEXT::CodeView

Set by PeCoffLoaderLoadImage() to CodeView area of the PE/COFF Debug directory.

UINT64 PE_COFF_LOADER_IMAGE_CONTEXT::Context

Private storage for implementation specific data.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::DebugDirectoryEntryRva

Set by PeCoffLoaderGetImageInfo() to the Relative Virtual Address of the debug directory, if it exists in the image

PHYSICAL_ADDRESS PE_COFF_LOADER_IMAGE_CONTEXT::DestinationAddress

Is set to zero by PeCoffLoaderGetImageInfo(). If DestinationAddress is non-zero, PeCoffLoaderRelocateImage() will relocate the image using this base address. If the DestinationAddress is zero, the ImageAddress will be used as the base address of relocation.

PHYSICAL_ADDRESS PE_COFF_LOADER_IMAGE_CONTEXT::EntryPoint

PeCoffLoaderLoadImage() sets EntryPoint to to the entry point of the PE/COFF image.

VOID* PE_COFF_LOADER_IMAGE_CONTEXT::FixupData

Caller allocated buffer of size FixupDataSize that can be optionally allocated prior to calling PeCoffLoaderRelocateImage(). This buffer is filled with the information used to fix up the image. The fixups have been applied to the image and this entry is just for information.

UINTN PE_COFF_LOADER_IMAGE_CONTEXT::FixupDataSize

Set by PeCoffLoaderLoadImage() to indicate the size of FixupData that the caller must allocate before calling PeCoffLoaderRelocateImage().

VOID* PE_COFF_LOADER_IMAGE_CONTEXT::Handle

Used as the FileHandle passed into the ImageRead function when it's called.

PHYSICAL_ADDRESS PE_COFF_LOADER_IMAGE_CONTEXT::HiiResourceData

Set by PeCoffLoaderLoadImage() to the HII resource offset if the image contains a custom PE/COFF resource with the type 'HII'. Otherwise, the entry remains to be 0.

PHYSICAL_ADDRESS PE_COFF_LOADER_IMAGE_CONTEXT::ImageAddress

Set by PeCoffLoaderGetImageInfo() to the ImageBase in the PE/COFF header.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::ImageCodeMemoryType

Not used by this library class. Other library classes that layer on top of this library class fill in this value as part of their GetImageInfo call. This allows the caller of the library to know what type of memory needs to be allocated to load and relocate the image.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::ImageDataMemoryType

Not used by this library class. Other library classes that layer on top of this library class fill in this value as part of their GetImageInfo call. This allows the caller of the library to know what type of memory needs to be allocated to load and relocate the image.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::ImageError

Set by any of the library functions if they encounter an error.

PE_COFF_LOADER_READ_FILE PE_COFF_LOADER_IMAGE_CONTEXT::ImageRead

Passed in by the caller to PeCoffLoaderGetImageInfo() and PeCoffLoaderLoadImage() to abstract accessing the image from the library.

UINT64 PE_COFF_LOADER_IMAGE_CONTEXT::ImageSize

Set by PeCoffLoaderGetImageInfo() to the SizeOfImage in the PE/COFF header. Image size includes the size of Debug Entry if it is present.

UINT16 PE_COFF_LOADER_IMAGE_CONTEXT::ImageType

Set by PeCoffLoaderGetImageInfo() to the subsystem type stored in the PE/COFF header.

BOOLEAN PE_COFF_LOADER_IMAGE_CONTEXT::IsTeImage

Set by PeCoffLoaderGetImageInfo() to TRUE if the image is a TE image. For a definition of the TE Image format, see the Platform Initialization Pre-EFI Initialization Core Interface Specification.

UINT16 PE_COFF_LOADER_IMAGE_CONTEXT::Machine

Set by PeCoffLoaderGetImageInfo() to the machine type stored in the PE/COFF header.

CHAR8* PE_COFF_LOADER_IMAGE_CONTEXT::PdbPointer

Set by PeCoffLoaderLoadImage() to point to the PDB entry contained in the CodeView area. The PdbPointer points to the filename of the PDB file used for source-level debug of the image by a debugger.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::PeCoffHeaderOffset

Set by PeCoffLoaderGetImageInfo() to offset to the PE/COFF header. If the PE/COFF image does not start with a DOS header, this value is zero. Otherwise, it's the offset to the PE/COFF header.

BOOLEAN PE_COFF_LOADER_IMAGE_CONTEXT::RelocationsStripped

Set by PeCoffLoaderGetImageInfo() to TRUE if the PE/COFF image does not contain relocation information.

UINT32 PE_COFF_LOADER_IMAGE_CONTEXT::SectionAlignment

Set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header. If the image is a TE image, then this field is set to 0.

UINTN PE_COFF_LOADER_IMAGE_CONTEXT::SizeOfHeaders

Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header.