]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BasePeCoffLib/Ebc/PeCoffLoaderEx.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BasePeCoffLib / Ebc / PeCoffLoaderEx.c
CommitLineData
3eb9473e 1/*++\r
2\r
2c7e5c2f
HT
3Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 PeCoffLoaderEx.c\r
16 \r
17Abstract: \r
18\r
19 EBC Specific relocation fixups.\r
20\r
21--*/\r
22\r
23#include "BasePeCoffLibInternals.h"\r
24\r
25/**\r
26 Performs an EBC specific relocation fixup.\r
27\r
28 @param Reloc Pointer to the relocation record.\r
29 @param Fixup Pointer to the address to fix up.\r
30 @param FixupData Pointer to a buffer to log the fixups.\r
31 @param Adjust The offset to adjust the fixup.\r
32\r
33 @retval EFI_UNSUPPORTED Unsupported now.\r
34\r
35**/\r
36RETURN_STATUS\r
37GluePeCoffLoaderRelocateImageEx (\r
38 IN UINT16 *Reloc,\r
39 IN OUT CHAR8 *Fixup,\r
40 IN OUT CHAR8 **FixupData,\r
41 IN UINT64 Adjust\r
42 )\r
43{\r
44 return RETURN_UNSUPPORTED;\r
45}\r
46\r
47/**\r
48 Returns TRUE if the machine type of PE/COFF image is supported. Supported \r
49 does not mean the image can be executed it means the PE/COFF loader supports\r
50 loading and relocating of the image type. It's up to the caller to support\r
51 the entry point. \r
52\r
53 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,\r
54 & X64 images. Calling the entry point in a correct mannor is up to the \r
55 consumer of this library.\r
56\r
57 @param Machine Machine type from the PE Header.\r
58\r
59 @return TRUE if this PE/COFF loader can load the image\r
60\r
61**/\r
62BOOLEAN\r
63PeCoffLoaderImageFormatSupported (\r
64 IN UINT16 Machine\r
65 )\r
66{\r
67 if ((Machine == EFI_IMAGE_MACHINE_IA32) || (Machine == EFI_IMAGE_MACHINE_X64) || \r
68 (Machine == EFI_IMAGE_MACHINE_EBC)) {\r
69 return TRUE; \r
70 }\r
71\r
72 return FALSE;\r
73}\r
74\r
75\r
76/**\r
77 Performs an Itanium-based specific re-relocation fixup and is a no-op on other\r
78 instruction sets. This is used to re-relocated the image into the EFI virtual\r
79 space for runtime calls.\r
80\r
81 @param Reloc Pointer to the relocation record.\r
82 @param Fixup Pointer to the address to fix up.\r
83 @param FixupData Pointer to a buffer to log the fixups.\r
84 @param Adjust The offset to adjust the fixup.\r
85\r
86 @return Status code.\r
87\r
88**/\r
89RETURN_STATUS\r
90GluePeHotRelocateImageEx (\r
91 IN UINT16 *Reloc,\r
92 IN OUT CHAR8 *Fixup,\r
93 IN OUT CHAR8 **FixupData,\r
94 IN UINT64 Adjust\r
95 )\r
96{\r
97 return RETURN_UNSUPPORTED;\r
98}\r