From 547a6507936e6088302e01d6624d60f58d56b732 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Thu, 16 Jul 2015 00:56:14 +0000 Subject: BaseTools: Fixed incorrect alignment bug. The alignment in rule section is shared by modules to generate FFS, it should not be modified by certain module. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18016 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/GenFds/EfiSection.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/GenFds') diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py index 8f61c4d2db..09fb28f32d 100644 --- a/BaseTools/Source/Python/GenFds/EfiSection.py +++ b/BaseTools/Source/Python/GenFds/EfiSection.py @@ -97,6 +97,7 @@ class EfiSection (EfiSectionClassObject): return FileList, self.Alignment Index = 0 + Align = self.Alignment """ If Section type is 'VERSION'""" OutputFileList = [] @@ -229,9 +230,9 @@ class EfiSection (EfiSectionClassObject): if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'): ImageObj = PeImageClass (File) if ImageObj.SectionAlignment < 0x400: - self.Alignment = str (ImageObj.SectionAlignment) + Align = str (ImageObj.SectionAlignment) else: - self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K' + Align = str (ImageObj.SectionAlignment / 0x400) + 'K' if File[(len(File)-4):] == '.efi': MapFile = File.replace('.efi', '.map') @@ -272,4 +273,4 @@ class EfiSection (EfiSectionClassObject): ) OutputFileList.append(OutputFile) - return OutputFileList, self.Alignment + return OutputFileList, Align -- cgit v1.2.3