]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fixed incorrect alignment bug.
authorYingke Liu <yingke.d.liu@intel.com>
Thu, 16 Jul 2015 00:56:14 +0000 (00:56 +0000)
committeryingke <yingke@Edk2>
Thu, 16 Jul 2015 00:56:14 +0000 (00:56 +0000)
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

BaseTools/Source/Python/GenFds/EfiSection.py

index 8f61c4d2dbf670a39d76c15a0ae396bf5c1958bd..09fb28f32d78c227895af41176c2594e1b6a8c27 100644 (file)
@@ -97,6 +97,7 @@ class EfiSection (EfiSectionClassObject):
                 return FileList, self.Alignment\r
 \r
         Index = 0\r
+        Align = self.Alignment\r
 \r
         """ If Section type is 'VERSION'"""\r
         OutputFileList = []\r
@@ -229,9 +230,9 @@ class EfiSection (EfiSectionClassObject):
                     if self.Alignment == 'Auto' and (SectionType == 'PE32' or SectionType == 'TE'):\r
                         ImageObj = PeImageClass (File)\r
                         if ImageObj.SectionAlignment < 0x400:\r
-                            self.Alignment = str (ImageObj.SectionAlignment)\r
+                            Align = str (ImageObj.SectionAlignment)\r
                         else:\r
-                            self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
+                            Align = str (ImageObj.SectionAlignment / 0x400) + 'K'\r
 \r
                     if File[(len(File)-4):] == '.efi':\r
                         MapFile = File.replace('.efi', '.map')\r
@@ -272,4 +273,4 @@ class EfiSection (EfiSectionClassObject):
                                                          )\r
                     OutputFileList.append(OutputFile)\r
 \r
-        return OutputFileList, self.Alignment\r
+        return OutputFileList, Align\r