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