diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-06 01:20:17 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-06 01:20:17 +0000 |
commit | 1a2ae0f71f51c1bc52576ce99647513a29f71d98 (patch) | |
tree | 080bbca8a3deb12020d8497e70f85eb0a9b94c2d /Nt32Pkg | |
parent | 21ff163c8c023ba599d29482b5badfb324c27b88 (diff) | |
download | edk2-1a2ae0f71f51c1bc52576ce99647513a29f71d98.tar.gz edk2-1a2ae0f71f51c1bc52576ce99647513a29f71d98.tar.bz2 edk2-1a2ae0f71f51c1bc52576ce99647513a29f71d98.zip |
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
Diffstat (limited to 'Nt32Pkg')
-rw-r--r-- | Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c | 16 | ||||
-rw-r--r-- | Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf | 2 |
2 files changed, 6 insertions, 12 deletions
diff --git a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c index a816d704e2..524d6c060d 100644 --- a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c +++ b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.c @@ -68,12 +68,11 @@ UINTN mPdbNameModHandleArraySize = 0; **/
EFI_STATUS
EFIAPI
-DxeNt32PeCoffLibExtraActionConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+Nt32PeCoffGetWinNtThunkStucture (
+ VOID
)
{
- EFI_HOB_GUID_TYPE *GuidHob;
+ EFI_HOB_GUID_TYPE *GuidHob;
//
// Retrieve WinNtThunkProtocol from GUID'ed HOB
@@ -284,10 +283,10 @@ PeCoffLoaderRelocateImageExtraAction ( ASSERT (ImageContext != NULL);
if (mWinNt == NULL) {
- return;
+ Nt32PeCoffGetWinNtThunkStucture ();
}
- //
+ //
// If we load our own PE COFF images the Windows debugger can not source
// level debug our code. If a valid PDB pointer exists usw it to load
// the *.dll file as a library using Windows* APIs. This allows
@@ -397,12 +396,9 @@ PeCoffLoaderUnloadImageExtraAction ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
- VOID *ModHandle;
+ VOID *ModHandle;
ASSERT (ImageContext != NULL);
- if (mWinNt == NULL) {
- return;
- }
ModHandle = RemoveModeHandle (ImageContext);
if (ModHandle != NULL) {
diff --git a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf index f50e97f826..97a132b441 100644 --- a/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf +++ b/Nt32Pkg/Library/DxeNt32PeCoffExtraActionLib/DxeNt32PeCoffExtraActionLib.inf @@ -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.
#
|