mirror of https://github.com/acidanthera/audk.git
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:
parent
21ff163c8c
commit
1a2ae0f71f
|
@ -68,12 +68,11 @@ UINTN mPdbNameModHandleArraySize = 0;
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
DxeNt32PeCoffLibExtraActionConstructor (
|
Nt32PeCoffGetWinNtThunkStucture (
|
||||||
IN EFI_HANDLE ImageHandle,
|
VOID
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
EFI_HOB_GUID_TYPE *GuidHob;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Retrieve WinNtThunkProtocol from GUID'ed HOB
|
// Retrieve WinNtThunkProtocol from GUID'ed HOB
|
||||||
|
@ -284,10 +283,10 @@ PeCoffLoaderRelocateImageExtraAction (
|
||||||
ASSERT (ImageContext != NULL);
|
ASSERT (ImageContext != NULL);
|
||||||
|
|
||||||
if (mWinNt == NULL) {
|
if (mWinNt == NULL) {
|
||||||
return;
|
Nt32PeCoffGetWinNtThunkStucture ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// If we load our own PE COFF images the Windows debugger can not source
|
// 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
|
// 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
|
// the *.dll file as a library using Windows* APIs. This allows
|
||||||
|
@ -397,12 +396,9 @@ PeCoffLoaderUnloadImageExtraAction (
|
||||||
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
VOID *ModHandle;
|
VOID *ModHandle;
|
||||||
|
|
||||||
ASSERT (ImageContext != NULL);
|
ASSERT (ImageContext != NULL);
|
||||||
if (mWinNt == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ModHandle = RemoveModeHandle (ImageContext);
|
ModHandle = RemoveModeHandle (ImageContext);
|
||||||
if (ModHandle != NULL) {
|
if (ModHandle != NULL) {
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
LIBRARY_CLASS = PeCoffExtraActionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_DRIVER
|
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.
|
# The following information is for reference only and not required by the build tools.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue