]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/BasePeCoffLib/PeCoffLoaderEx.c
Sync up ArmPkg with patch from mailing list. Changed name of BdsLib.h to BdsUnixLib...
[mirror_edk2.git] / ArmPkg / Library / BasePeCoffLib / PeCoffLoaderEx.c
CommitLineData
934309d5 1/** @file\r
2 Specific relocation fixups for none Itanium architecture.\r
3\r
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 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**/\r
14\r
15#include "BasePeCoffLibInternals.h"\r
16\r
17\r
18/**\r
19 Performs an Itanium-based specific relocation fixup and is a no-op on other\r
20 instruction sets.\r
21\r
22 @param Reloc The pointer to the relocation record.\r
23 @param Fixup The pointer to the address to fix up.\r
24 @param FixupData The pointer to a buffer to log the fixups.\r
25 @param Adjust The offset to adjust the fixup.\r
26\r
27 @return Status code.\r
28\r
29**/\r
30RETURN_STATUS\r
31PeCoffLoaderRelocateImageEx (\r
32 IN UINT16 **Reloc,\r
33 IN OUT CHAR8 *Fixup,\r
34 IN OUT CHAR8 **FixupData,\r
35 IN UINT64 Adjust\r
36 )\r
37{\r
38 return RETURN_UNSUPPORTED;\r
39}\r
40\r
41/**\r
42 Returns TRUE if the machine type of PE/COFF image is supported. Supported\r
43 does not mean the image can be executed it means the PE/COFF loader supports\r
44 loading and relocating of the image type. It's up to the caller to support\r
45 the entry point.\r
46 \r
47 The IA32/X64 version PE/COFF loader/relocater both support IA32, X64 and EBC images.\r
48\r
49 @param Machine The machine type from the PE Header.\r
50\r
51 @return TRUE if this PE/COFF loader can load the image\r
52\r
53**/\r
54BOOLEAN\r
55PeCoffLoaderImageFormatSupported (\r
56 IN UINT16 Machine\r
57 )\r
58{\r
59 if ((Machine == IMAGE_FILE_MACHINE_I386) || (Machine == IMAGE_FILE_MACHINE_X64) || \r
60 (Machine == IMAGE_FILE_MACHINE_EBC)) {\r
61 return TRUE; \r
62 }\r
63\r
64 return FALSE;\r
65}\r
66\r
67/**\r
68 Performs an Itanium-based specific re-relocation fixup and is a no-op on other\r
69 instruction sets. This is used to re-relocated the image into the EFI virtual\r
70 space for runtime calls.\r
71\r
72 @param Reloc Pointer to pointer to the relocation record.\r
73 @param Fixup Pointer to the address to fix up.\r
74 @param FixupData Pointer to a buffer to log the fixups.\r
75 @param Adjust The offset to adjust the fixup.\r
76\r
77 @return Status code.\r
78\r
79**/\r
80RETURN_STATUS\r
81PeHotRelocateImageEx (\r
82 IN UINT16 **Reloc,\r
83 IN OUT CHAR8 *Fixup,\r
84 IN OUT CHAR8 **FixupData,\r
85 IN UINT64 Adjust\r
86 )\r
87{\r
88 return RETURN_UNSUPPORTED;\r
89}\r
90\r