diff options
Diffstat (limited to 'BaseTools/Source/C/Common/BasePeCoff.c')
-rw-r--r-- | BaseTools/Source/C/Common/BasePeCoff.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/BaseTools/Source/C/Common/BasePeCoff.c b/BaseTools/Source/C/Common/BasePeCoff.c index afb45df40b..9652557d13 100644 --- a/BaseTools/Source/C/Common/BasePeCoff.c +++ b/BaseTools/Source/C/Common/BasePeCoff.c @@ -57,14 +57,6 @@ PeCoffLoaderRelocateIa32Image ( );
RETURN_STATUS
-PeCoffLoaderRelocateX64Image (
- IN UINT16 *Reloc,
- IN OUT CHAR8 *Fixup,
- IN OUT CHAR8 **FixupData,
- IN UINT64 Adjust
- );
-
-RETURN_STATUS
PeCoffLoaderRelocateIpfImage (
IN UINT16 *Reloc,
IN OUT CHAR8 *Fixup,
@@ -80,14 +72,6 @@ PeCoffLoaderRelocateArmImage ( IN UINT64 Adjust
);
-RETURN_STATUS
-PeCoffLoaderRelocateAArch64Image (
- IN UINT16 *Reloc,
- IN OUT CHAR8 *Fixup,
- IN OUT CHAR8 **FixupData,
- IN UINT64 Adjust
- );
-
STATIC
RETURN_STATUS
PeCoffLoaderGetPeHeader (
@@ -619,6 +603,7 @@ Returns: CHAR8 *FixupBase;
UINT16 *F16;
UINT32 *F32;
+ UINT64 *F64;
CHAR8 *FixupData;
PHYSICAL_ADDRESS BaseAddress;
UINT16 MachineType;
@@ -778,6 +763,16 @@ Returns: }
break;
+ 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;
+
case EFI_IMAGE_REL_BASED_HIGHADJ:
//
// Return the same EFI_UNSUPPORTED return code as
@@ -795,15 +790,9 @@ Returns: case EFI_IMAGE_MACHINE_ARMT:
Status = PeCoffLoaderRelocateArmImage (&Reloc, Fixup, &FixupData, Adjust);
break;
- case EFI_IMAGE_MACHINE_X64:
- Status = PeCoffLoaderRelocateX64Image (Reloc, Fixup, &FixupData, Adjust);
- break;
case EFI_IMAGE_MACHINE_IA64:
Status = PeCoffLoaderRelocateIpfImage (Reloc, Fixup, &FixupData, Adjust);
break;
- case EFI_IMAGE_MACHINE_AARCH64:
- Status = PeCoffLoaderRelocateAArch64Image (Reloc, Fixup, &FixupData, Adjust);
- break;
default:
Status = RETURN_UNSUPPORTED;
break;
|