Change DxeNt32PeCoffExtraActionLib to not depend on the library constructor to initialize mWinNt pointer because DxeCore calls the library API before it calls the constructor.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10776 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu 2010-08-06 01:20:17 +00:00
parent 21ff163c8c
commit 1a2ae0f71f
2 changed files with 6 additions and 12 deletions

View File

@ -68,9 +68,8 @@ UINTN mPdbNameModHandleArraySize = 0;
**/
EFI_STATUS
EFIAPI
DxeNt32PeCoffLibExtraActionConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
Nt32PeCoffGetWinNtThunkStucture (
VOID
)
{
EFI_HOB_GUID_TYPE *GuidHob;
@ -284,7 +283,7 @@ PeCoffLoaderRelocateImageExtraAction (
ASSERT (ImageContext != NULL);
if (mWinNt == NULL) {
return;
Nt32PeCoffGetWinNtThunkStucture ();
}
//
@ -400,9 +399,6 @@ PeCoffLoaderUnloadImageExtraAction (
VOID *ModHandle;
ASSERT (ImageContext != NULL);
if (mWinNt == NULL) {
return;
}
ModHandle = RemoveModeHandle (ImageContext);
if (ModHandle != NULL) {

View File

@ -23,8 +23,6 @@
VERSION_STRING = 1.0
LIBRARY_CLASS = PeCoffExtraActionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER
CONSTRUCTOR = DxeNt32PeCoffLibExtraActionConstructor
#
# The following information is for reference only and not required by the build tools.
#