]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BasePeCoffLib/x64/PeCoffLoaderEx.c
2 x64 Specific relocation fixups.
4 Copyright (c) 2005 - 2006 Intel Corporation. <BR>
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
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.
15 #include "BasePeCoffLibInternals.h"
18 Performs an x64 specific relocation fixup.
20 @param Reloc Pointer to the relocation record
21 @param Fixup Pointer to the address to fix up
22 @param FixupData Pointer to a buffer to log the fixups
23 @param Adjust The offset to adjust the fixup
25 @retval RETURN_SUCCESS Success to perform relocation
26 @retval RETURN_UNSUPPORTED Unsupported.
29 PeCoffLoaderRelocateImageEx (
32 IN OUT CHAR8
**FixupData
,
36 return RETURN_UNSUPPORTED
;
40 Returns TRUE if the machine type of PE/COFF image is supported. Supported
41 does not mean the image can be executed it means the PE/COFF loader supports
42 loading and relocating of the image type. It's up to the caller to support
45 This function implies the basic PE/COFF loader/relocator supports IA32, EBC,
46 & X64 images. Calling the entry point in a correct mannor is up to the
47 consumer of this library.
49 @param Machine Machine type from the PE Header.
51 @return TRUE if this PE/COFF loader can load the image
55 PeCoffLoaderImageFormatSupported (
59 if ((Machine
== EFI_IMAGE_MACHINE_IA32
) || (Machine
== EFI_IMAGE_MACHINE_X64
) ||
60 (Machine
== EFI_IMAGE_MACHINE_EBC
)) {
69 Performs an X64 specific re-relocation fixup and is a no-op on other
70 instruction sets. This is used to re-relocated the image into the EFI virtual
71 space for runtime calls.
73 @param Reloc Pointer to the relocation record.
74 @param Fixup Pointer to the address to fix up.
75 @param FixupData Pointer to a buffer to log the fixups.
76 @param Adjust The offset to adjust the fixup.
82 PeHotRelocateImageEx (
85 IN OUT CHAR8
**FixupData
,
89 return RETURN_UNSUPPORTED
;