Re: [edk2] [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image

2016-08-22 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -Original Message- From: Gao, Liming Sent: Monday, August 22, 2016 11:09 AM To: edk2-devel@lists.01.org Cc: Ard Biesheuvel ; Zhu, Yonghong Subject:

Re: [edk2] [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image

2016-08-22 Thread Ard Biesheuvel
On 22 August 2016 at 09:07, Gao, Liming wrote: > Ard: > This is done to convert PE/COFF image to TE image. TE image Relocation > VirtualAddress will be set to non-zero. You can find the following logic in > GenFw.c line 2515. Then, PeCoffLib can restore RELOCS_STRIPPED

Re: [edk2] [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image

2016-08-22 Thread Gao, Liming
Ard: This is done to convert PE/COFF image to TE image. TE image Relocation VirtualAddress will be set to non-zero. You can find the following logic in GenFw.c line 2515. Then, PeCoffLib can restore RELOCS_STRIPPED flag from TE image. if (((PeHdr->Pe32.FileHeader.Characteristics &

Re: [edk2] [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image

2016-08-22 Thread Ard Biesheuvel
On 22 August 2016 at 05:09, Liming Gao wrote: > If PE image has no relocation section, and has not set RELOCS_STRIPPED, > after it is converted to TE image, GenFw will set its relocation section > VirtualAddress to non-zero address, and keep Size value as Zero. I cannot

[edk2] [Patch] BaseTools PeCoffLib: Fix the issue to get RelocationsStripped from TE image

2016-08-21 Thread Liming Gao
If PE image has no relocation section, and has not set RELOCS_STRIPPED, after it is converted to TE image, GenFw will set its relocation section VirtualAddress to non-zero address, and keep Size value as Zero. MdePkg BasePeCoffLib applied this rule to get RelocationsStripped attribute. But, it is