]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/EfiSection.py
BaseTools: Set section alignment as zero if its type is Auto
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / EfiSection.py
index e7d463904120391672c4cbabdf3dbb9991993531..fd58391dac9919e46960140dcf65e1c3102067d6 100644 (file)
@@ -260,14 +260,7 @@ class EfiSection (EfiSectionClassObject):
 \r
                     #Get PE Section alignment when align is set to AUTO\r
                     if self.Alignment == 'Auto' and (SectionType == BINARY_FILE_TYPE_PE32 or SectionType == BINARY_FILE_TYPE_TE):\r
-                        ImageObj = PeImageClass (File)\r
-                        if ImageObj.SectionAlignment < 0x400:\r
-                            Align = str (ImageObj.SectionAlignment)\r
-                        elif ImageObj.SectionAlignment < 0x100000:\r
-                            Align = str (ImageObj.SectionAlignment // 0x400) + 'K'\r
-                        else:\r
-                            Align = str (ImageObj.SectionAlignment // 0x100000) + 'M'\r
-\r
+                        Align = "0"\r
                     if File[(len(File)-4):] == '.efi' and FfsInf.InfModule.BaseName == os.path.basename(File)[:-4]:\r
                         MapFile = File.replace('.efi', '.map')\r
                         CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')\r