Revision: 18016
          http://sourceforge.net/p/edk2/code/18016
Author:   jljusten
Date:     2015-07-26 07:36:57 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/GenFds/EfiSection.py

Modified: trunk/edk2/BaseTools/Source/Python/GenFds/EfiSection.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/GenFds/EfiSection.py     2015-07-26 
07:36:51 UTC (rev 18015)
+++ trunk/edk2/BaseTools/Source/Python/GenFds/EfiSection.py     2015-07-26 
07:36:57 UTC (rev 18016)
@@ -97,6 +97,7 @@
                 return FileList, self.Alignment
 
         Index = 0
+        Align = self.Alignment
 
         """ If Section type is 'VERSION'"""
         OutputFileList = []
@@ -229,9 +230,9 @@
                     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 @@
                                                          )
                     OutputFileList.append(OutputFile)
 
-        return OutputFileList, self.Alignment
+        return OutputFileList, Align


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to