VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c

最後變更 在這個檔案是 99404,由 vboxsync 提交於 2 年 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette