From aace0f39c49f301f97cfd21fbc90859036abca00 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 22 Feb 2023 15:20:00 +0100 Subject: [PATCH] Allow stripped PE/COFF images to be loaded, just warn about it --- xtldr/modules/pecoff/pecoff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xtldr/modules/pecoff/pecoff.c b/xtldr/modules/pecoff/pecoff.c index aa8e955..8ec7bfb 100644 --- a/xtldr/modules/pecoff/pecoff.c +++ b/xtldr/modules/pecoff/pecoff.c @@ -416,7 +416,8 @@ PepRelocateLoadedImage(IN PPECOFF_IMAGE_CONTEXT Image) if(Image->PeHeader->FileHeader.Characteristics & PECOFF_IMAGE_FILE_RELOCS_STRIPPED) { /* No relocation information found */ - return STATUS_EFI_UNSUPPORTED; + XtLdrProtocol->DbgPrint(L"WARNING: PE/COFF image is stripped and contains no information about relocations\n"); + return STATUS_EFI_SUCCESS; } /* Set relocation data directory */