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