From: jwang36 Date: Mon, 26 Mar 2007 09:30:32 +0000 (+0000) Subject: Remove the generation of "Exit" function calling since the UefiApplicationLib has... X-Git-Tag: edk2-stable201903~23391 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a5dd05b513de4bd0f246a05d45a41952a697d596 Remove the generation of "Exit" function calling since the UefiApplicationLib has defined the Exit function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2506 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java index b1414a7c75..192c36f2e8 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java @@ -1100,7 +1100,11 @@ public class AutoGen { if (!entryPointList[i].equals("")) { fileBuffer.append(" if (SetJump (&mJumpContext) == 0) {\r\n"); fileBuffer.append(String.format(" " + debugStr, entryPointList[i], entryPointList[i])); - fileBuffer.append(" ExitDriver ("); + if (CommonDefinition.getModuleType(typeStr) == CommonDefinition.ModuleTypeUefiApplication) { + fileBuffer.append(" Exit ("); + } else { + fileBuffer.append(" ExitDriver ("); + } fileBuffer.append(entryPointList[i]); fileBuffer.append(" (ImageHandle, SystemTable));\r\n"); fileBuffer.append(" ASSERT (FALSE);\r\n"); @@ -1113,25 +1117,27 @@ public class AutoGen { } fileBuffer.append("}\r\n\r\n"); - fileBuffer.append("VOID\r\n"); - fileBuffer.append("EFIAPI\r\n"); - fileBuffer.append("ExitDriver (\r\n"); - fileBuffer.append(" IN EFI_STATUS Status\r\n"); - fileBuffer.append(" )\r\n\r\n"); - fileBuffer.append("{\r\n"); - if (entryPointCount <= 1) { - fileBuffer.append(" if (EFI_ERROR (Status)) {\r\n"); - fileBuffer.append(" ProcessLibraryDestructorList (gImageHandle, gST);\r\n"); - fileBuffer.append(" }\r\n"); - fileBuffer.append(" gBS->Exit (gImageHandle, Status, 0, NULL);\r\n"); - } else { - fileBuffer.append(" if (!EFI_ERROR (Status) || EFI_ERROR (mDriverEntryPointStatus)) {\r\n"); - fileBuffer.append(" mDriverEntryPointStatus = Status;\r\n"); - fileBuffer.append(" }\r\n"); - fileBuffer.append(" LongJump (&mJumpContext, (UINTN)-1);\r\n"); - fileBuffer.append(" ASSERT (FALSE);\r\n"); + if (CommonDefinition.getModuleType(typeStr) != CommonDefinition.ModuleTypeUefiApplication) { + fileBuffer.append("VOID\r\n"); + fileBuffer.append("EFIAPI\r\n"); + fileBuffer.append("ExitDriver (\r\n"); + fileBuffer.append(" IN EFI_STATUS Status\r\n"); + fileBuffer.append(" )\r\n\r\n"); + fileBuffer.append("{\r\n"); + if (entryPointCount <= 1) { + fileBuffer.append(" if (EFI_ERROR (Status)) {\r\n"); + fileBuffer.append(" ProcessLibraryDestructorList (gImageHandle, gST);\r\n"); + fileBuffer.append(" }\r\n"); + fileBuffer.append(" gBS->Exit (gImageHandle, Status, 0, NULL);\r\n"); + } else { + fileBuffer.append(" if (!EFI_ERROR (Status) || EFI_ERROR (mDriverEntryPointStatus)) {\r\n"); + fileBuffer.append(" mDriverEntryPointStatus = Status;\r\n"); + fileBuffer.append(" }\r\n"); + fileBuffer.append(" LongJump (&mJumpContext, (UINTN)-1);\r\n"); + fileBuffer.append(" ASSERT (FALSE);\r\n"); + } + fileBuffer.append("}\r\n\r\n"); } - fileBuffer.append("}\r\n\r\n"); } if (CommonDefinition.getModuleType(typeStr) == CommonDefinition.ModuleTypeUefiApplication) {