summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}