diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-07-16 00:56:14 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-07-16 00:56:14 +0000 |
commit | 547a6507936e6088302e01d6624d60f58d56b732 (patch) | |
tree | f170ea5278eb44ae1346b7f1a8a1571f21042d58 /BaseTools/Source/Python | |
parent | 680742607132a7733880407453b5f792699d7143 (diff) | |
download | edk2-547a6507936e6088302e01d6624d60f58d56b732.tar.gz edk2-547a6507936e6088302e01d6624d60f58d56b732.tar.bz2 edk2-547a6507936e6088302e01d6624d60f58d56b732.zip |
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/Source/Python')
-rw-r--r-- | BaseTools/Source/Python/GenFds/EfiSection.py | 7 |
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
|