[edk2,2/6] MdePkg/BasePeCoffLib: remove redundant handling of EFI_IMAGE_REL_BASED_DIR64

Message ID 1435916407-29683-3-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel July 3, 2015, 9:40 a.m.
The IPF implementation of PeHotRelocateImageEx () handles relocations
of type EFI_IMAGE_REL_BASED_DIR64. However, since the caller already
handles this type, this is essentially dead code and can be removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c | 10 ----------
 1 file changed, 10 deletions(-)

Patch hide | download patch | download mbox

diff --git a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
index 96e122b69814..a590f3906fab 100644
--- a/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c
@@ -267,16 +267,6 @@  PeHotRelocateImageEx (
   UINT64  FixupVal;
 
   switch ((*Reloc) >> 12) {
-  case EFI_IMAGE_REL_BASED_DIR64:
-    Fixup64     = (UINT64 *) Fixup;
-    *FixupData  = ALIGN_POINTER (*FixupData, sizeof (UINT64));
-    if (*(UINT64 *) (*FixupData) == *Fixup64) {
-      *Fixup64 = *Fixup64 + (UINT64) Adjust;
-    }
-
-    *FixupData = *FixupData + sizeof (UINT64);
-    break;
-
   case EFI_IMAGE_REL_BASED_IA64_IMM64:
     Fixup64     = (UINT64 *) Fixup;
     *FixupData  = ALIGN_POINTER (*FixupData, sizeof (UINT64));