summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-10-09 18:55:41 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-10-09 18:55:41 +0000
commit485b3066542c1278ec32b60a9c905000721256ce (patch)
tree8e7578e952bc09178a722ee5316df559acae4657 /MdePkg
parent94762ddef67f8805f4a3aef86e73dc27f234eb71 (diff)
downloadedk2-485b3066542c1278ec32b60a9c905000721256ce.tar.gz
edk2-485b3066542c1278ec32b60a9c905000721256ce.tar.bz2
edk2-485b3066542c1278ec32b60a9c905000721256ce.zip
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 <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@18597 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
index d6bf42738d..38f891e2fd 100644
--- a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
+++ b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
@@ -234,6 +234,7 @@ PeHotRelocateImageEx (
FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;
ThumbMovwMovtImmediatePatch (Fixup16, FixupVal);
}
+ *FixupData = *FixupData + sizeof(UINT64);
break;
case EFI_IMAGE_REL_BASED_ARM_MOV32A: