summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c')
-rw-r--r--MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c b/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c
index 47bb0db891..6f5200361d 100644
--- a/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c
+++ b/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c
@@ -14,17 +14,15 @@
#include <Base.h>
#include <Library/PeCoffExtraActionLib.h>
+#include <Library/DebugLib.h>
/**
- Applies additional actions to relocate fixups to a PE/COFF image.
+ Performs additional actions after a PE/COFF image has been loaded and relocated.
- Generally this function is called after sucessfully Applying relocation fixups
- to a PE/COFF image for some specicial purpose.
- As a example, For NT32 emulator, the function should be implemented and called
- to support source level debug.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that is being 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
@@ -33,20 +31,17 @@ PeCoffLoaderRelocateImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
+ ASSERT (ImageContext != NULL);
}
/**
- 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().
- For NT32 emulator, the PE/COFF image loaded by system needs to release.
- For real platform, the PE/COFF image loaded by Core doesn't needs 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 to be unloaded.
+ @param ImageContext Pointer to the image context structure that describes the
+ PE/COFF image that is being unloaded.
**/
VOID
@@ -55,4 +50,5 @@ PeCoffLoaderUnloadImageExtraAction (
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
+ ASSERT (ImageContext != NULL);
}