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