diff options
Diffstat (limited to 'MdePkg/Library/BasePeCoffLib')
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 11 | ||||
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf | 1 | ||||
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c index 91df24e09c..9274f31aa2 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c @@ -540,6 +540,9 @@ PeCoffLoaderRelocateImage ( // If there are no relocation entries, then we are done
//
if (ImageContext->RelocationsStripped) {
+ // Applies additional environment specific actions to relocate fixups
+ // to a PE/COFF image if needed
+ PeCoffLoaderRelocateImageExtraAction (ImageContext);
return RETURN_SUCCESS;
}
@@ -736,6 +739,11 @@ PeCoffLoaderRelocateImage ( ImageContext->EntryPoint -= (UINT64) ImageContext->ImageAddress;
ImageContext->EntryPoint += (UINT64) ImageContext->DestinationAddress;
}
+
+ // Applies additional environment specific actions to relocate fixups
+ // to a PE/COFF image if needed
+ PeCoffLoaderRelocateImageExtraAction (ImageContext);
+
return RETURN_SUCCESS;
}
@@ -1411,5 +1419,8 @@ PeCoffLoaderUnloadImage ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
)
{
+ // Applies additional environment specific actions to unload a
+ // PE/COFF image if needed
+ PeCoffLoaderUnloadImageExtraAction (ImageContext);
return RETURN_SUCCESS;
}
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf index 28e942cb7f..534b78ec25 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf @@ -41,5 +41,6 @@ [LibraryClasses]
DebugLib
+ PeCoffExtraActionLib
BaseMemoryLib
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h index c8f95a11ff..864337b0c8 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h @@ -19,6 +19,7 @@ #include <Library/PeCoffLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
+#include <Library/PeCoffExtraActionLib.h>
#include <IndustryStandard/PeImage.h>
|