]> git.proxmox.com Git - mirror_edk2.git/blame - OldMdePkg/Include/Common/PeCoffLoaderImageContext.h
Moved the MdePkg to OldMdePkg so that new code in MdePkg does not break existing...
[mirror_edk2.git] / OldMdePkg / Include / Common / PeCoffLoaderImageContext.h
CommitLineData
ddc9ec37 1/** @file\r
2 Important data type defined used for Memory Only PE COFF loader. \r
3\r
4 Copyright (c) 2007, Intel Corporation \r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
13**/\r
14\r
15#ifndef __PECOFFLOADER_IMAGE_CONTEXT_H\r
16#define __PECOFFLOADER_IMAGE_CONTEXT_H\r
17\r
18//\r
19// PE/COFF Loader Read Function passed in by caller\r
20//\r
21typedef\r
22RETURN_STATUS\r
23(EFIAPI *PE_COFF_LOADER_READ_FILE) (\r
24 IN VOID *FileHandle,\r
25 IN UINTN FileOffset,\r
26 IN OUT UINTN *ReadSize,\r
27 OUT VOID *Buffer\r
28 );\r
29\r
30//\r
31// Context structure used while PE/COFF image is being loaded and relocated\r
32//\r
33typedef struct {\r
34 PHYSICAL_ADDRESS ImageAddress;\r
35 UINT64 ImageSize;\r
36 PHYSICAL_ADDRESS DestinationAddress;\r
37 PHYSICAL_ADDRESS EntryPoint;\r
38 PE_COFF_LOADER_READ_FILE ImageRead;\r
39 VOID *Handle;\r
40 VOID *FixupData;\r
41 UINT32 SectionAlignment;\r
42 UINT32 PeCoffHeaderOffset;\r
43 UINT32 DebugDirectoryEntryRva;\r
44 VOID *CodeView;\r
45 CHAR8 *PdbPointer;\r
46 UINTN SizeOfHeaders;\r
47 UINT32 ImageCodeMemoryType;\r
48 UINT32 ImageDataMemoryType;\r
49 UINT32 ImageError;\r
50 UINTN FixupDataSize;\r
51 UINT16 Machine;\r
52 UINT16 ImageType;\r
53 BOOLEAN RelocationsStripped;\r
54 BOOLEAN IsTeImage;\r
55} PE_COFF_LOADER_IMAGE_CONTEXT;\r
56\r
57#endif\r