]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ia32/PeCoffLoaderEx.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / ia32 / PeCoffLoaderEx.h
1 /*++
2
3 Copyright (c) 2004 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 PeCoffLoaderEx.h
15
16 Abstract:
17
18 IA-32 Specific relocation fixups
19
20 Revision History
21
22 --*/
23
24 #ifndef _PE_COFF_LOADER_EX_H_
25 #define _PE_COFF_LOADER_EX_H_
26
27 EFI_STATUS
28 PeCoffLoaderRelocateImageEx (
29 IN UINT16 *Reloc,
30 IN OUT CHAR8 *Fixup,
31 IN OUT CHAR8 **FixupData,
32 IN UINT64 Adjust
33 )
34 /*++
35
36 Routine Description:
37
38 Performs an IA-32 specific relocation fixup
39
40 Arguments:
41
42 Reloc - Pointer to the relocation record
43
44 Fixup - Pointer to the address to fix up
45
46 FixupData - Pointer to a buffer to log the fixups
47
48 Adjust - The offset to adjust the fixup
49
50 Returns:
51
52 EFI_UNSUPPORTED - relocate unsupported
53
54 --*/
55 ;
56
57 BOOLEAN
58 PeCoffLoaderImageFormatSupported (
59 IN UINT16 Machine
60 )
61 /*++
62 Routine Description:
63
64 Returns TRUE if the machine type of PE/COFF image is supported. Supported
65 does not mean the image can be executed it means the PE/COFF loader supports
66 loading and relocating of the image type. It's up to the caller to support
67 the entry point.
68
69 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,
70 & X64 images. Calling the entry point in a correct mannor is up to the
71 consumer of this library.
72
73 Arguments:
74
75 Machine - Machine type from the PE Header.
76
77 Returns:
78
79 TRUE - if this PE/COFF loader can load the image
80 FALSE - if this PE/COFF loader cannot load the image
81
82 --*/
83 ;
84
85 #endif