]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Image/Image.c
Update PeiLoadFilePpi produced by PeiCore to load only images with relocation into...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Image / Image.c
index bb2e0693da0e9265528d6b397ba527232cbea1e7..24ecd93ad88b2f6e4b4416a67cd457d82be2bc96 100644 (file)
@@ -145,7 +145,7 @@ LoadAndRelocatePeCoffImage (
   //\r
   // Allocate Memory for the image\r
   //\r
-  if ((Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {\r
+  if ((!ImageContext.RelocationsStripped) && (Private->PeiMemoryInstalled) && (Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) {\r
     ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN) AllocatePages (EFI_SIZE_TO_PAGES ((UINT32) ImageContext.ImageSize));\r
     ASSERT (ImageContext.ImageAddress != 0);\r
     \r