Update PeiLoadFilePpi produced by PeiCore to load only images with relocation into...
authorlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 15 Jan 2010 09:48:37 +0000 (09:48 +0000)
committerlgao4 <lgao4@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 15 Jan 2010 09:48:37 +0000 (09:48 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@9775 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Core/Pei/Image/Image.c

index bb2e069..24ecd93 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