]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePeCoffLib/BasePeCoff.c
Remove PeRemove PeiPeCoffLoader.h and gPeiPeCoffLoaderGuid, and Add PeCoffExtraAction...
[mirror_edk2.git] / MdePkg / Library / BasePeCoffLib / BasePeCoff.c
index 91df24e09c540d2d999b892aab0dc6e2719b7d29..9274f31aa22d15b0b1351bc9356be0e8c940b830 100644 (file)
@@ -540,6 +540,9 @@ PeCoffLoaderRelocateImage (
   // If there are no relocation entries, then we are done\r
   //\r
   if (ImageContext->RelocationsStripped) {\r
+       // Applies additional environment specific actions to relocate fixups \r
+       // to a PE/COFF image if needed\r
+       PeCoffLoaderRelocateImageExtraAction (ImageContext);    \r
     return RETURN_SUCCESS;\r
   }\r
 \r
@@ -736,6 +739,11 @@ PeCoffLoaderRelocateImage (
      ImageContext->EntryPoint -= (UINT64) ImageContext->ImageAddress;\r
      ImageContext->EntryPoint += (UINT64) ImageContext->DestinationAddress;\r
   }\r
+  \r
+  // Applies additional environment specific actions to relocate fixups \r
+  // to a PE/COFF image if needed\r
+  PeCoffLoaderRelocateImageExtraAction (ImageContext);\r
+  \r
   return RETURN_SUCCESS;\r
 }\r
 \r
@@ -1411,5 +1419,8 @@ PeCoffLoaderUnloadImage (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
+  // Applies additional environment specific actions to unload a \r
+  // PE/COFF image if needed\r
+  PeCoffLoaderUnloadImageExtraAction (ImageContext);\r
   return RETURN_SUCCESS;\r
 }\r