summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-19 18:52:07 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-19 18:52:07 +0000
commit202515b47d871f46fbd14ce1750a95e604763c5d (patch)
treeb5f71ac4aaa6fe99e29867c3ee96ee8a96827307 /Tools
parent928fbe8f1ccde38db0058dd138f0787ca6c6e6ed (diff)
downloadedk2-202515b47d871f46fbd14ce1750a95e604763c5d.zip
edk2-202515b47d871f46fbd14ce1750a95e604763c5d.tar.gz
edk2-202515b47d871f46fbd14ce1750a95e604763c5d.tar.bz2
Compute the end address of a section read from a file using the SizeOfRawData instead of VirtualSize, because the PE/COFF image format allows the SizeOfRawData to be smaller then VirtualSize.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1563 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r--Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c b/Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c
index 9c25e1f..556b2d7 100644
--- a/Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c
+++ b/Tools/Source/TianoTools/PeCoffLoader/BasePeCoff.c
@@ -858,7 +858,7 @@ Returns:
Base = PeCoffLoaderImageAddress (ImageContext, Section->VirtualAddress);
End = PeCoffLoaderImageAddress (
ImageContext,
- Section->VirtualAddress + Section->Misc.VirtualSize - 1
+ Section->VirtualAddress + Section->SizeOfRawData - 1
);
if (ImageContext->IsTeImage) {
Base = (CHAR8 *) ((UINTN) Base + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN) TeHdr->StrippedSize);