From 1046284db9ec38ad6478160a57d8030331d6c5b2 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Tue, 23 Sep 2008 07:16:46 +0000 Subject: Don't align image address for TeImage, because TeImage section alignment is undefined. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5948 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Dxe/Image/Image.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index 2185883..954710c 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -314,9 +314,11 @@ CoreLoadPeImage ( } Image->ImageBasePage = Image->ImageContext.ImageAddress; - Image->ImageContext.ImageAddress = - (Image->ImageContext.ImageAddress + Image->ImageContext.SectionAlignment - 1) & - ~((UINTN)Image->ImageContext.SectionAlignment - 1); + if (!Image->ImageContext.IsTeImage) { + Image->ImageContext.ImageAddress = + (Image->ImageContext.ImageAddress + Image->ImageContext.SectionAlignment - 1) & + ~((UINTN)Image->ImageContext.SectionAlignment - 1); + } // // Load the image from the file into the allocated memory -- cgit v1.1