X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FAutoGen%2FGenC.py;fp=BaseTools%2FSource%2FPython%2FAutoGen%2FGenC.py;h=a922464f568522819e595e077c46cf629b46b0c9;hp=0f1b3bb9a3e9633d8e824e851e76ed1b13b1d2aa;hb=3a4698202cf5ca81d4401bdc6c0974400064f333;hpb=90b24889f9ced53c18b73266d507e45fbd94fab0 diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 0f1b3bb9a3..a922464f56 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1457,25 +1457,10 @@ def CreateLibraryDestructorCode(Info, AutoGenC, AutoGenH): def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in [SUP_MODULE_USER_DEFINED, SUP_MODULE_SEC]: return - ModuleEntryPointList = [] - for Lib in Info.DependentLibraryList: - if len(Lib.ModuleEntryPointList) > 0: - if Lib.ModuleType == Info.ModuleType: - ModuleEntryPointList = ModuleEntryPointList + Lib.ModuleEntryPointList - else: - EdkLogger.error( - "build", - PREBUILD_ERROR, - "Driver's ModuleType must be consistent [%s]"%(str(Lib)), - File=str(Info.PlatformInfo), - ExtraData="consumed by [%s]" % str(Info.MetaFile) - ) - ModuleEntryPointList = ModuleEntryPointList + Info.Module.ModuleEntryPointList - # # Module Entry Points # - NumEntryPoints = len(ModuleEntryPointList) + NumEntryPoints = len(Info.Module.ModuleEntryPointList) if 'PI_SPECIFICATION_VERSION' in Info.Module.Specification: PiSpecVersion = Info.Module.Specification['PI_SPECIFICATION_VERSION'] else: @@ -1485,7 +1470,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): else: UefiSpecVersion = '0x00000000' Dict = { - 'Function' : ModuleEntryPointList, + 'Function' : Info.Module.ModuleEntryPointList, 'PiSpecVersion' : PiSpecVersion + 'U', 'UefiSpecVersion': UefiSpecVersion + 'U' } @@ -1498,7 +1483,7 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): AUTOGEN_ERROR, '%s must have exactly one entry point' % Info.ModuleType, File=str(Info), - ExtraData= ", ".join(ModuleEntryPointList) + ExtraData= ", ".join(Info.Module.ModuleEntryPointList) ) if Info.ModuleType == SUP_MODULE_PEI_CORE: AutoGenC.Append(gPeiCoreEntryPointString.Replace(Dict)) @@ -1552,18 +1537,11 @@ def CreateModuleEntryPointCode(Info, AutoGenC, AutoGenH): def CreateModuleUnloadImageCode(Info, AutoGenC, AutoGenH): if Info.IsLibrary or Info.ModuleType in [SUP_MODULE_USER_DEFINED, SUP_MODULE_BASE, SUP_MODULE_SEC]: return - - ModuleUnloadImageList = [] - for Lib in Info.DependentLibraryList: - if len(Lib.ModuleUnloadImageList) > 0: - ModuleUnloadImageList = ModuleUnloadImageList + Lib.ModuleUnloadImageList - ModuleUnloadImageList = ModuleUnloadImageList + Info.Module.ModuleUnloadImageList - # # Unload Image Handlers # - NumUnloadImage = len(ModuleUnloadImageList) - Dict = {'Count':str(NumUnloadImage) + 'U', 'Function':ModuleUnloadImageList} + NumUnloadImage = len(Info.Module.ModuleUnloadImageList) + Dict = {'Count':str(NumUnloadImage) + 'U', 'Function':Info.Module.ModuleUnloadImageList} if NumUnloadImage < 2: AutoGenC.Append(gUefiUnloadImageString[NumUnloadImage].Replace(Dict)) else: