summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-23 07:16:46 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-23 07:16:46 +0000
commit1046284db9ec38ad6478160a57d8030331d6c5b2 (patch)
tree7a1fd57a4041e27a55c54a9698f73c3567cf51f2
parentbdabfae78d16baed7c0f3247c8be30e9092de227 (diff)
downloadedk2-platforms-1046284db9ec38ad6478160a57d8030331d6c5b2.tar.xz
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
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 2185883109..954710c38f 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