From: bbahnsen Date: Mon, 24 Apr 2006 22:48:11 +0000 (+0000) Subject: Rename the dir X-Git-Tag: edk2-stable201903~25596 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=366387de2e5d7aed2c4cf6263a68d6c5d2e68805;ds=sidebyside Rename the dir git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@17 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Source/TianoTools/GenFvImage/X64/PeCoffLoaderEx.c b/Tools/Source/TianoTools/GenFvImage/X64/PeCoffLoaderEx.c new file mode 100644 index 0000000000..6bcae272e7 --- /dev/null +++ b/Tools/Source/TianoTools/GenFvImage/X64/PeCoffLoaderEx.c @@ -0,0 +1,76 @@ +/*++ + +Copyright 2005, Intel Corporation +All rights reserved. This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + +Module Name: + + PeCoffLoaderEx.c + +Abstract: + + x64 Specific relocation fixups + +Revision History + +--*/ + +#define EFI_SPECIFICATION_VERSION 0x00000000 +#define EDK_RELEASE_VERSION 0x00020000 +#include +#include +#include + + + + +RETURN_STATUS +PeCoffLoaderRelocateImageEx ( + IN UINT16 *Reloc, + IN OUT CHAR8 *Fixup, + IN OUT CHAR8 **FixupData, + IN UINT64 Adjust + ) +/*++ + +Routine Description: + Performs an x64 specific relocation fixup + +Arguments: + Reloc - Pointer to the relocation record + Fixup - Pointer to the address to fix up + FixupData - Pointer to a buffer to log the fixups + Adjust - The offset to adjust the fixup + +Returns: + None + +--*/ +{ + UINT64 *F64; + + switch ((*Reloc) >> 12) { + + case EFI_IMAGE_REL_BASED_DIR64: + F64 = (UINT64 *) Fixup; + *F64 = *F64 + (UINT64) Adjust; + if (*FixupData != NULL) { + *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64)); + *(UINT64 *)(*FixupData) = *F64; + *FixupData = *FixupData + sizeof(UINT64); + } + break; + + default: + return RETURN_UNSUPPORTED; + } + + return RETURN_SUCCESS; +} diff --git a/Tools/Source/TianoTools/GenFvImage/x64/PeCoffLoaderEx.c b/Tools/Source/TianoTools/GenFvImage/x64/PeCoffLoaderEx.c deleted file mode 100644 index 6bcae272e7..0000000000 --- a/Tools/Source/TianoTools/GenFvImage/x64/PeCoffLoaderEx.c +++ /dev/null @@ -1,76 +0,0 @@ -/*++ - -Copyright 2005, Intel Corporation -All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - -Module Name: - - PeCoffLoaderEx.c - -Abstract: - - x64 Specific relocation fixups - -Revision History - ---*/ - -#define EFI_SPECIFICATION_VERSION 0x00000000 -#define EDK_RELEASE_VERSION 0x00020000 -#include -#include -#include - - - - -RETURN_STATUS -PeCoffLoaderRelocateImageEx ( - IN UINT16 *Reloc, - IN OUT CHAR8 *Fixup, - IN OUT CHAR8 **FixupData, - IN UINT64 Adjust - ) -/*++ - -Routine Description: - Performs an x64 specific relocation fixup - -Arguments: - Reloc - Pointer to the relocation record - Fixup - Pointer to the address to fix up - FixupData - Pointer to a buffer to log the fixups - Adjust - The offset to adjust the fixup - -Returns: - None - ---*/ -{ - UINT64 *F64; - - switch ((*Reloc) >> 12) { - - case EFI_IMAGE_REL_BASED_DIR64: - F64 = (UINT64 *) Fixup; - *F64 = *F64 + (UINT64) Adjust; - if (*FixupData != NULL) { - *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64)); - *(UINT64 *)(*FixupData) = *F64; - *FixupData = *FixupData + sizeof(UINT64); - } - break; - - default: - return RETURN_UNSUPPORTED; - } - - return RETURN_SUCCESS; -}