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
This commit is contained in:
lgao4 2008-09-23 07:16:46 +00:00
parent bdabfae78d
commit 1046284db9
1 changed files with 5 additions and 3 deletions

View File

@ -314,9 +314,11 @@ CoreLoadPeImage (
}
Image->ImageBasePage = Image->ImageContext.ImageAddress;
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