summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/Common
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-10-09 18:55:28 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-10-09 18:55:28 +0000
commit94762ddef67f8805f4a3aef86e73dc27f234eb71 (patch)
treef9f9af11c5b6475da83d686627fbd69fbefc897b /BaseTools/Source/C/Common
parent6d72ff7d9daf7efae5243e9c00a281b350fc0f95 (diff)
downloadedk2-94762ddef67f8805f4a3aef86e73dc27f234eb71.tar.gz
edk2-94762ddef67f8805f4a3aef86e73dc27f234eb71.tar.bz2
edk2-94762ddef67f8805f4a3aef86e73dc27f234eb71.zip
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 <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18596 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/Common')
-rw-r--r--BaseTools/Source/C/Common/PeCoffLoaderEx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/C/Common/PeCoffLoaderEx.c b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
index 382138a893..d04fa7d5ba 100644
--- a/BaseTools/Source/C/Common/PeCoffLoaderEx.c
+++ b/BaseTools/Source/C/Common/PeCoffLoaderEx.c
@@ -402,8 +402,8 @@ PeCoffLoaderRelocateArmImage (
if (*FixupData != NULL) {
*FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
- *(UINT64 *)(*FixupData) = *Fixup16;
CopyMem (*FixupData, Fixup16, sizeof (UINT64));
+ *FixupData = *FixupData + sizeof(UINT64);
}
break;