Revision: 18597
          http://sourceforge.net/p/edk2/code/18597
Author:   abiesheuvel
Date:     2015-10-09 18:55:41 +0000 (Fri, 09 Oct 2015)
Log Message:
-----------
MdePkg/PeCoffLoader: fix handling of ARM MOVW/MOVT instruction relocs

Advance the *FixupData pointer after use in the second relocation pass
for runtime when handling ARM MOVW/MOVT immediate relocations.

Note that using FixupData is somewhat pointless for relocations targeting
instructions rather than data items, since the program cannot typically
modify its own instructions, and the second pass should be performed
unconditionally. But let's just fix it for now.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c

Modified: trunk/edk2/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
===================================================================
--- trunk/edk2/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c        
2015-10-09 18:55:28 UTC (rev 18596)
+++ trunk/edk2/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c        
2015-10-09 18:55:41 UTC (rev 18597)
@@ -234,6 +234,7 @@
       FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;
       ThumbMovwMovtImmediatePatch (Fixup16, FixupVal);
     }
+    *FixupData = *FixupData + sizeof(UINT64);
     break;
   
   case EFI_IMAGE_REL_BASED_ARM_MOV32A:


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to