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