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
This commit is contained in:
Ard Biesheuvel 2015-10-09 18:55:41 +00:00 committed by abiesheuvel
parent 94762ddef6
commit 485b306654
1 changed files with 1 additions and 0 deletions

View File

@ -234,6 +234,7 @@ PeHotRelocateImageEx (
FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust; FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;
ThumbMovwMovtImmediatePatch (Fixup16, FixupVal); ThumbMovwMovtImmediatePatch (Fixup16, FixupVal);
} }
*FixupData = *FixupData + sizeof(UINT64);
break; break;
case EFI_IMAGE_REL_BASED_ARM_MOV32A: case EFI_IMAGE_REL_BASED_ARM_MOV32A: