Reviewed-by: Liming Gao <liming....@intel.com>

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] 
Sent: Friday, October 09, 2015 3:24 AM
To: Leif Lindholm
Cc: edk2-devel@lists.01.org; Gao, Liming; Zhu, Yonghong; Kinney, Michael D
Subject: Re: [PATCH 2/2] MdePkg/PeCoffLoader: fix handling of ARM MOVW/MOVT 
instruction relocs

On 6 October 2015 at 13:02, Leif Lindholm <leif.lindh...@linaro.org> wrote:
> On Tue, Sep 29, 2015 at 10:29:00AM +0200, Ard Biesheuvel wrote:
>> 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.biesheu...@linaro.org>

@Liming: are you ok with these patches?

>> ---
>>  MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c 
>> b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c
>> index d6bf42738d2b..38f891e2fdaa 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:
>> --
>> 1.9.1
>
> Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to