From: Yonghong Zhu Date: Thu, 14 Apr 2016 02:04:55 +0000 (+0800) Subject: BaseTools/GenFw: Update to handle PE image with .code section only X-Git-Tag: edk2-stable201903~7305 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=3c4db2dfe2f1ea2cf8529671765111319bbadca4 BaseTools/GenFw: Update to handle PE image with .code section only current GenFw rebase the image which only has .code section, but no other section, the tool return error. this patch fix this bug to support it. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c index 9ddd18e294..4a91df5d22 100644 --- a/BaseTools/Source/C/GenFw/GenFw.c +++ b/BaseTools/Source/C/GenFw/GenFw.c @@ -893,13 +893,6 @@ Returns: } } - // - // No available section header is found. - // - if (Index == ImgHdr->Pe32.FileHeader.NumberOfSections) { - return EFI_NOT_FOUND; - } - // // BaseAddress is set to section header. //