From b36d134faf4305247830522b8e2bb255e98c5699 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Sun, 18 Sep 2011 12:17:25 +0000 Subject: 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 --- BaseTools/Source/C/GenFw/GenFw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/C/GenFw') 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; } -- cgit v1.2.3