]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Change DxeNt32PeCoffExtraActionLib to not depend on the library constructor to initia...
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Aug 2010 01:20:17 +0000 (01:20 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 6 Aug 2010 01:20:17 +0000 (01:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10776 6f19259b-4bc3-4df7-8a09-765794883524

Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c
Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf

index a816d704e29b3ace615e6f0b2d53727f07c587f4..524d6c060de3738ca5be352ab7a5612706a86ae0 100644 (file)
@@ -68,12 +68,11 @@ UINTN                   mPdbNameModHandleArraySize = 0;
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-DxeNt32PeCoffLibExtraActionConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
+Nt32PeCoffGetWinNtThunkStucture (\r
+  VOID\r
   )\r
 {\r
-       EFI_HOB_GUID_TYPE   *GuidHob;\r
+  EFI_HOB_GUID_TYPE   *GuidHob;\r
 \r
   //\r
   // Retrieve WinNtThunkProtocol from GUID'ed HOB\r
@@ -284,10 +283,10 @@ PeCoffLoaderRelocateImageExtraAction (
   ASSERT (ImageContext != NULL);\r
 \r
   if (mWinNt == NULL) {\r
-    return;\r
+    Nt32PeCoffGetWinNtThunkStucture ();\r
   }\r
 \r
-       //\r
+  //\r
   // If we load our own PE COFF images the Windows debugger can not source\r
   //  level debug our code. If a valid PDB pointer exists usw it to load\r
   //  the *.dll file as a library using Windows* APIs. This allows \r
@@ -397,12 +396,9 @@ PeCoffLoaderUnloadImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-       VOID *ModHandle;\r
+  VOID *ModHandle;\r
 \r
   ASSERT (ImageContext != NULL);\r
-  if (mWinNt == NULL) {\r
-    return;\r
-  }\r
 \r
   ModHandle = RemoveModeHandle (ImageContext);\r
   if (ModHandle != NULL) {\r
index f50e97f826893fa1e40b471ec026f66883128335..97a132b441979a47744aa0a4b240360ba52ccd96 100644 (file)
@@ -23,8 +23,6 @@
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = PeCoffExtraActionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER\r
 \r
-  CONSTRUCTOR                    = DxeNt32PeCoffLibExtraActionConstructor\r
-\r
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r