diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-15 11:24:23 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-15 11:24:23 +0000 |
commit | 582c7220f83e9e37778cd2ef5a34cd79d1494538 (patch) | |
tree | 8d9179a3d462bbc269d0cad097349242fc8a690e /Tools | |
parent | 5b664244561a6d697d1814e7c525cc6013863caf (diff) | |
download | edk2-platforms-582c7220f83e9e37778cd2ef5a34cd79d1494538.tar.xz |
Correct TeImage Header based on PeiCis spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2250 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CCode/Source/PeCoffLoader/BasePeCoff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c b/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c index f2053b7e38..72df90f389 100644 --- a/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c +++ b/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c @@ -260,7 +260,7 @@ Returns: if (!(ImageContext->IsTeImage)) {
ImageContext->ImageAddress = PeHdr.OptionalHeader.ImageBase;
} else {
- ImageContext->ImageAddress = (PHYSICAL_ADDRESS) (TeHdr.ImageBase + sizeof (EFI_TE_IMAGE_HEADER) - TeHdr.StrippedSize);
+ ImageContext->ImageAddress = (PHYSICAL_ADDRESS) (TeHdr.ImageBase + TeHdr.StrippedSize - sizeof (EFI_TE_IMAGE_HEADER));
}
//
// Initialize the alternate destination address to 0 indicating that it
|