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 <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18016 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yingke Liu 2015-07-16 00:56:14 +00:00 committed by yingke
parent 6807426071
commit 547a650793
1 changed files with 4 additions and 3 deletions

View File

@ -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