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