summaryrefslogtreecommitdiff
path: root/UnixPkg/Library
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-09 00:51:14 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-09 00:51:14 +0000
commit6cb6f078ae95b64715609b87c1e28538395bd821 (patch)
treedf51f5c1e38950bbdad67c608257598b6dd42fb0 /UnixPkg/Library
parent51f1a2b5b8bad569a64450a043981899e6ef518d (diff)
downloadedk2-platforms-6cb6f078ae95b64715609b87c1e28538395bd821.tar.xz
Sync with PE/COFF Extra Action library class comments and add ASSERT() conditions if ImageContext is NULL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8274 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg/Library')
-rw-r--r--UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c32
-rw-r--r--UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c32
2 files changed, 32 insertions, 32 deletions
diff --git a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
index d2c6b67b53..1d5cfe48a5 100644
--- a/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
+++ b/UnixPkg/Library/DxeUnixPeCoffExtraActionLib/DxeUnixPeCoffExtraActionLib.c
@@ -68,13 +68,12 @@ DxeUnixPeCoffLibExtraActionConstructor (
}
/**
- Applies additional actions to relocate fixups to a PE/COFF image.
-
- Generally this function is called after sucessfully Applying relocation fixups
- to a PE/COFF image for some specicial purpose.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that is being relocated.
+ Performs additional actions after a PE/COFF image has been loaded and relocated.
+
+ If ImageContext is NULL, then ASSERT().
+
+ @param ImageContext Pointer to the image context structure that describes the
+ PE/COFF image that has already been loaded and relocated.
**/
VOID
@@ -86,6 +85,8 @@ PeCoffLoaderRelocateImageExtraAction (
VOID * Handle;
VOID * Entry;
+ ASSERT (ImageContext != NULL);
+
Handle = NULL;
Entry = NULL;
@@ -112,15 +113,13 @@ PeCoffLoaderRelocateImageExtraAction (
}
/**
- Unloads a loaded PE/COFF image from memory and releases its taken resource.
-
- Releases any environment specific resources that were allocated when the image
- specified by ImageContext was loaded using PeCoffLoaderLoadImage().
-
- If ImageContext is NULL, then ASSERT().
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image to be unloaded.
+ Performs additional actions just before a PE/COFF image is unloaded. Any resources
+ that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
+
+ If ImageContext is NULL, then ASSERT().
+
+ @param ImageContext Pointer to the image context structure that describes the
+ PE/COFF image that is being unloaded.
**/
VOID
@@ -129,4 +128,5 @@ PeCoffLoaderUnloadImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
+ ASSERT (ImageContext != NULL);
}
diff --git a/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c b/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
index 4fcb9d418e..e20b16a814 100644
--- a/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
+++ b/UnixPkg/Library/PeiUnixPeCoffExtraActionLib/PeiUnixPeCoffExtraActionLib.c
@@ -70,13 +70,12 @@ UnixPeCoffGetUnixThunkStucture (
}
/**
- Applies additional actions to relocate fixups to a PE/COFF image.
-
- Generally this function is called after sucessfully Applying relocation fixups
- to a PE/COFF image for some specicial purpose.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that is being relocated.
+ Performs additional actions after a PE/COFF image has been loaded and relocated.
+
+ If ImageContext is NULL, then ASSERT().
+
+ @param ImageContext Pointer to the image context structure that describes the
+ PE/COFF image that has already been loaded and relocated.
**/
VOID
@@ -88,6 +87,8 @@ PeCoffLoaderRelocateImageExtraAction (
VOID * Handle;
VOID * Entry;
+ ASSERT (ImageContext != NULL);
+
Handle = NULL;
Entry = NULL;
@@ -117,15 +118,13 @@ PeCoffLoaderRelocateImageExtraAction (
}
/**
- Unloads a loaded PE/COFF image from memory and releases its taken resource.
-
- Releases any environment specific resources that were allocated when the image
- specified by ImageContext was loaded using PeCoffLoaderLoadImage().
-
- If ImageContext is NULL, then ASSERT().
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image to be unloaded.
+ Performs additional actions just before a PE/COFF image is unloaded. Any resources
+ that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
+
+ If ImageContext is NULL, then ASSERT().
+
+ @param ImageContext Pointer to the image context structure that describes the
+ PE/COFF image that is being unloaded.
**/
VOID
@@ -134,4 +133,5 @@ PeCoffLoaderUnloadImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
+ ASSERT (ImageContext != NULL);
}