summaryrefslogtreecommitdiff
path: root/Tools/Java
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-26 09:30:32 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-26 09:30:32 +0000
commita5dd05b513de4bd0f246a05d45a41952a697d596 (patch)
tree3db1c20a6f5fcd28fb2630fb295a4ed79f034725 /Tools/Java
parentc0b162a2c0b5c60386230e00764d6820bd4c8f74 (diff)
downloadedk2-platforms-a5dd05b513de4bd0f246a05d45a41952a697d596.tar.xz
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
Diffstat (limited to 'Tools/Java')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java44
1 files changed, 25 insertions, 19 deletions
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) {