]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/DataSection.py
BaseTools: Replace Binary File type strings with predefined constant
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / DataSection.py
index 99d7392aaab3de984d803b62a8c656aa1544f418..29caa00c0d8dc4ff6031afa600c3d7e80b0e81ed 100644 (file)
@@ -82,7 +82,7 @@ class DataSection (DataSectionClassObject):
                         CopyLongFilePath(MapFile, CopyMapFile)\r
 \r
         #Get PE Section alignment when align is set to AUTO\r
-        if self.Alignment == 'Auto' and self.SecType in ('TE', 'PE32'):\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
@@ -92,7 +92,7 @@ class DataSection (DataSectionClassObject):
                 self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'\r
 \r
         NoStrip = True\r
-        if self.SecType in ('TE', 'PE32'):\r
+        if self.SecType in (BINARY_FILE_TYPE_TE, BINARY_FILE_TYPE_PE32):\r
             if self.KeepReloc is not None:\r
                 NoStrip = self.KeepReloc\r
 \r
@@ -110,7 +110,7 @@ class DataSection (DataSectionClassObject):
                 )\r
             self.SectFileName = StrippedFile\r
 \r
-        if self.SecType == 'TE':\r
+        if self.SecType == BINARY_FILE_TYPE_TE:\r
             TeFile = os.path.join( OutputPath, ModuleName + 'Te.raw')\r
             GenFdsGlobalVariable.GenerateFirmwareImage(\r
                     TeFile,\r