]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BasePeCoffLib/Ia32/PeCoffLoaderEx.c
Removed cross references from PciCf8Lib and PciExpressLib class to PciLib class.
[mirror_edk2.git] / MdePkg / Library / BasePeCoffLib / Ia32 / PeCoffLoaderEx.c
1 /** @file
2 IA-32 Specific relocation fixups.
3
4 Copyright (c) 2006, Intel Corporation<BR>
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 Module Name: PeCoffLoaderEx.c
14
15 **/
16
17
18
19
20
21 /**
22 Performs an IA-32 specific relocation fixup.
23
24 @param Reloc Pointer to the relocation record.
25 @param Fixup Pointer to the address to fix up.
26 @param FixupData Pointer to a buffer to log the fixups.
27 @param Adjust The offset to adjust the fixup.
28
29 @retval EFI_UNSUPPORTED Unsupported now.
30
31 **/
32 RETURN_STATUS
33 PeCoffLoaderRelocateImageEx (
34 IN UINT16 *Reloc,
35 IN OUT CHAR8 *Fixup,
36 IN OUT CHAR8 **FixupData,
37 IN UINT64 Adjust
38 )
39 {
40 return RETURN_UNSUPPORTED;
41 }
42
43 /**
44 Returns TRUE if the machine type of PE/COFF image is supported. Supported
45 does not mean the image can be executed it means the PE/COFF loader supports
46 loading and relocating of the image type. It's up to the caller to support
47 the entry point.
48
49 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,
50 & X64 images. Calling the entry point in a correct mannor is up to the
51 consumer of this library.
52
53 @param Machine Machine type from the PE Header.
54
55 @return TRUE if this PE/COFF loader can load the image
56
57 **/
58 BOOLEAN
59 PeCoffLoaderImageFormatSupported (
60 IN UINT16 Machine
61 )
62 {
63 if ((Machine == EFI_IMAGE_MACHINE_IA32) || (Machine == EFI_IMAGE_MACHINE_X64) ||
64 (Machine == EFI_IMAGE_MACHINE_EBC)) {
65 return TRUE;
66 }
67
68 return FALSE;
69 }
70
71 /**
72 Performs an Itanium-based specific re-relocation fixup and is a no-op on other
73 instruction sets. This is used to re-relocated the image into the EFI virtual
74 space for runtime calls.
75
76 @param Reloc Pointer to the relocation record.
77 @param Fixup Pointer to the address to fix up.
78 @param FixupData Pointer to a buffer to log the fixups.
79 @param Adjust The offset to adjust the fixup.
80
81 @return Status code.
82
83 **/
84 RETURN_STATUS
85 PeHotRelocateImageEx (
86 IN UINT16 *Reloc,
87 IN OUT CHAR8 *Fixup,
88 IN OUT CHAR8 **FixupData,
89 IN UINT64 Adjust
90 )
91 {
92 return RETURN_UNSUPPORTED;
93 }
94