]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/DataSection.py
BaseTools: Set section alignment as zero if its type is Auto
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / DataSection.py
index f20fd702254ae48454bc814a1b981034136a5bba..5af3ee7b7f7c2462a0097b1551bd44f6aac91ad0 100644 (file)
@@ -80,14 +80,7 @@ class DataSection (DataSectionClassObject):
 \r
         #Get PE Section alignment when align is set to AUTO\r
         if self.Alignment == 'Auto' and self.SecType in (BINARY_FILE_TYPE_TE, BINARY_FILE_TYPE_PE32):\r
-            ImageObj = PeImageClass (Filename)\r
-            if ImageObj.SectionAlignment < 0x400:\r
-                self.Alignment = str (ImageObj.SectionAlignment)\r
-            elif ImageObj.SectionAlignment < 0x100000:\r
-                self.Alignment = str (ImageObj.SectionAlignment // 0x400) + 'K'\r
-            else:\r
-                self.Alignment = str (ImageObj.SectionAlignment // 0x100000) + 'M'\r
-\r
+            self.Alignment = "0"\r
         NoStrip = True\r
         if self.SecType in (BINARY_FILE_TYPE_TE, BINARY_FILE_TYPE_PE32):\r
             if self.KeepReloc is not None:\r