13#ifndef __BASE_PE_COFF_LIB_H__
14#define __BASE_PE_COFF_LIB_H__
20#define IMAGE_ERROR_SUCCESS 0
21#define IMAGE_ERROR_IMAGE_READ 1
22#define IMAGE_ERROR_INVALID_PE_HEADER_SIGNATURE 2
23#define IMAGE_ERROR_INVALID_MACHINE_TYPE 3
24#define IMAGE_ERROR_INVALID_SUBSYSTEM 4
25#define IMAGE_ERROR_INVALID_IMAGE_ADDRESS 5
26#define IMAGE_ERROR_INVALID_IMAGE_SIZE 6
27#define IMAGE_ERROR_INVALID_SECTION_ALIGNMENT 7
28#define IMAGE_ERROR_SECTION_NOT_LOADED 8
29#define IMAGE_ERROR_FAILED_RELOCATION 9
30#define IMAGE_ERROR_FAILED_ICACHE_FLUSH 10
31#define IMAGE_ERROR_UNSUPPORTED 11
178 UINT32 DllCharacteristicsEx;
363 IN PHYSICAL_ADDRESS ImageBase,
364 IN PHYSICAL_ADDRESS VirtImageBase,
366 IN VOID *RelocationData
RETURN_STATUS EFIAPI PeCoffLoaderLoadImage(IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext)
RETURN_STATUS EFIAPI PeCoffLoaderRelocateImage(IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext)
VOID EFIAPI PeCoffLoaderRelocateImageForRuntime(IN PHYSICAL_ADDRESS ImageBase, IN PHYSICAL_ADDRESS VirtImageBase, IN UINTN ImageSize, IN VOID *RelocationData)
RETURN_STATUS EFIAPI PeCoffLoaderUnloadImage(IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext)
RETURN_STATUS(EFIAPI * PE_COFF_LOADER_READ_FILE)(IN VOID *FileHandle, IN UINTN FileOffset, IN OUT UINTN *ReadSize, OUT VOID *Buffer)
RETURN_STATUS EFIAPI PeCoffLoaderGetImageInfo(IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext)
RETURN_STATUS EFIAPI PeCoffLoaderImageReadFromMemory(IN VOID *FileHandle, IN UINTN FileOffset, IN OUT UINTN *ReadSize, OUT VOID *Buffer)
PHYSICAL_ADDRESS DestinationAddress
UINT32 ImageCodeMemoryType
BOOLEAN RelocationsStripped
UINT32 DebugDirectoryEntryRva
UINT16 DllCharacteristics
PE_COFF_LOADER_READ_FILE ImageRead
PHYSICAL_ADDRESS EntryPoint
UINT32 ImageDataMemoryType
UINT32 PeCoffHeaderOffset
PHYSICAL_ADDRESS HiiResourceData
PHYSICAL_ADDRESS ImageAddress