diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-05 17:08:14 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-05 17:08:14 +0000 |
commit | c0351cfecaa19d9e3384fd7180c621ec1ace4caa (patch) | |
tree | 39b05d000524c96559d6fb2d2a95d0ef3b8dbf41 /UnixPkg/Library | |
parent | 379f83dff03405050eb8b1d778276aa8f4a178bc (diff) | |
download | edk2-platforms-c0351cfecaa19d9e3384fd7180c621ec1ace4caa.tar.xz |
Fix crash in UnixPkg caused by r10769. The DxeCore is not calling the library constructor, but is calling the library members that are coded to assume the constructor has run. Check to make sure constructor has run before using services. If Dxe Core starts calling library constructor then this code will just work, but it may cause an issue with the extra call to load symbols, since we catch the symbol load in DxeIpl.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10774 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Library')
-rw-r--r-- | UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c index e04e580f6c..68bd7f84e2 100644 --- a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c +++ b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c @@ -84,8 +84,10 @@ PeCoffLoaderRelocateImageExtraAction ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
- mUnix->PeCoffRelocateImageExtraAction (ImageContext);
+ if (mUnix != NULL) {
+ mUnix->PeCoffRelocateImageExtraAction (ImageContext);
}
+}
@@ -105,5 +107,7 @@ PeCoffLoaderUnloadImageExtraAction ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
- mUnix->PeCoffUnloadImageExtraAction (ImageContext);
+ if (mUnix != NULL) {
+ mUnix->PeCoffUnloadImageExtraAction (ImageContext);
+ }
}
|