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

The handling of ARM MOVW/MOVT relocations sets the FixupData twice (once
incorrectly), but fails to advance the *FixupData pointer afterwards.
This is not actually a problem, since the fixup data is never used but
let's fix it anyway in case anyone reuses this code.

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/BaseTools/Source/C/Common/PeCoffLoaderEx.c

Modified: trunk/edk2/BaseTools/Source/C/Common/PeCoffLoaderEx.c
===================================================================
--- trunk/edk2/BaseTools/Source/C/Common/PeCoffLoaderEx.c       2015-10-09 
07:04:26 UTC (rev 18595)
+++ trunk/edk2/BaseTools/Source/C/Common/PeCoffLoaderEx.c       2015-10-09 
18:55:28 UTC (rev 18596)
@@ -402,8 +402,8 @@
     
     if (*FixupData != NULL) {
       *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
-      *(UINT64 *)(*FixupData) = *Fixup16;
       CopyMem (*FixupData, Fixup16, sizeof (UINT64));
+      *FixupData = *FixupData + sizeof(UINT64);
     }
     break;
   


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

Reply via email to