Compute the end address of a section read from a file using the SizeOfRawData instead...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Sep 2006 18:52:07 +0000 (18:52 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Sep 2006 18:52:07 +0000 (18:52 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1563 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c

index 9c25e1f..556b2d7 100644 (file)
@@ -858,7 +858,7 @@ Returns:
     Base = PeCoffLoaderImageAddress (ImageContext, Section->VirtualAddress);\r
     End = PeCoffLoaderImageAddress (\r
             ImageContext,\r
-            Section->VirtualAddress + Section->Misc.VirtualSize - 1\r
+            Section->VirtualAddress + Section->SizeOfRawData - 1\r
             );\r
     if (ImageContext->IsTeImage) {\r
       Base  = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);\r