summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2015-07-16 00:56:14 +0000
committeryingke <yingke@Edk2>2015-07-16 00:56:14 +0000
commit547a6507936e6088302e01d6624d60f58d56b732 (patch)
treef170ea5278eb44ae1346b7f1a8a1571f21042d58 /BaseTools
parent680742607132a7733880407453b5f792699d7143 (diff)
downloadedk2-platforms-547a6507936e6088302e01d6624d60f58d56b732.tar.xz
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
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/GenFds/EfiSection.py7
1 files changed, 4 insertions, 3 deletions
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