summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/GenFw
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-18 12:17:25 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-18 12:17:25 +0000
commitb36d134faf4305247830522b8e2bb255e98c5699 (patch)
treeec37795cbc86b693528a062030cb516039bcb1c2 /BaseTools/Source/C/GenFw
parente7fe4028631b6a7d70e3c02c7c40ff1504321daa (diff)
downloadedk2-platforms-b36d134faf4305247830522b8e2bb255e98c5699.tar.xz
Sync BaseTools Branch (version r2321) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/GenFw')
-rw-r--r--BaseTools/Source/C/GenFw/GenFw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 90ba251102..d511834fc0 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -147,7 +147,7 @@ Returns:
--*/
{
- fprintf (stdout, "%s Version %d.%d\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);
+ fprintf (stdout, "%s Version %d.%d %s \n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);
}
STATIC
@@ -658,7 +658,10 @@ PeCoffConvertImageToXip (
SectionHeader->SizeOfRawData
);
}
- SectionHeader->SizeOfRawData = SectionHeader->Misc.VirtualSize;
+ //
+ // Make the size of raw data in section header alignment.
+ //
+ SectionHeader->SizeOfRawData = (SectionHeader->Misc.VirtualSize + PeHdr->Pe32.OptionalHeader.FileAlignment - 1) & (~(PeHdr->Pe32.OptionalHeader.FileAlignment - 1));
SectionHeader->PointerToRawData = SectionHeader->VirtualAddress;
}