[edk2-devel] [PATCH] MdePkg BasePeCoffLib: Ignore the debug entry read error after it is found
gaoliming via groups.io
gaoliming=byosoft.com.cn at groups.io
Thu Apr 27 06:17:14 UTC 2023
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4425
This change is to support the pre-built EFI image on the old Edk2 code.
Old Edk2 GenFw tool generates the wrong debug entry in EFI image.
Those pre-built images can be loaded before d6457b309.
Signed-off-by: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Ard Biesheuvel <ardb at kernel.org>
Cc: Michael Kubacki <michael.kubacki at microsoft.com>
---
MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index 4b71176a0c..4636842eeb 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -735,7 +735,7 @@ PeCoffLoaderGetImageInfo (
&Size,
&DebugEntry
);
- if (RETURN_ERROR (Status) || (Size != ReadSize)) {
+ if ((ImageContext->DebugDirectoryEntryRva == 0) && (RETURN_ERROR (Status) || (Size != ReadSize))) {
ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ;
if (Size != ReadSize) {
Status = RETURN_UNSUPPORTED;
--
2.37.3.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103698): https://edk2.groups.io/g/devel/message/103698
Mute This Topic: https://groups.io/mt/98531785/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list