]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PeCoffLib.h
1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain.
[mirror_edk2.git] / MdePkg / Include / Library / PeCoffLib.h
index 920004aebcdf7ee131b11775d0f233068a942902..2b0050474be3e68cd24f3370e8eb619cc73fa0b9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Memory Only PE COFF loader. \r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
   All rights reserved. This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-  Module Name:  PeCoffLib.h\r
-\r
 **/\r
 \r
 #ifndef __BASE_PE_COFF_LIB_H__\r
 #define __BASE_PE_COFF_LIB_H__\r
 \r
+#include <IndustryStandard/PeImage.h>\r
 //\r
 // Return status codes from the PE/COFF Loader services\r
 // BUGBUG: Find where used and see if can be replaced by RETURN_STATUS codes\r
@@ -33,7 +32,6 @@
 #define IMAGE_ERROR_FAILED_RELOCATION            9\r
 #define IMAGE_ERROR_FAILED_ICACHE_FLUSH          10\r
 \r
-\r
 //\r
 // PE/COFF Loader Read Function passed in by caller\r
 //\r
@@ -73,7 +71,6 @@ typedef struct {
   BOOLEAN                           IsTeImage;\r
 } PE_COFF_LOADER_IMAGE_CONTEXT;\r
 \r
-\r
 /**\r
   Retrieves information about a PE/COFF image.\r
 \r
@@ -205,5 +202,22 @@ PeCoffLoaderRelocateImageForRuntime (
   )\r
 ;\r
 \r
+/**\r
+  Unloads a loaded PE/COFF image from memory and releases its taken resource.\r
+   \r
+  For NT32 emulator, the PE/COFF image loaded by system needs to release.\r
+  For real platform, the PE/COFF image loaded by Core doesn't needs to be unloaded, \r
+  this function can simply return RETURN_SUCCESS.\r
+\r
+  @param  ImageContext              Pointer to the image context structure that describes the PE/COFF\r
+                                    image to be unloaded.\r
 \r
+  @retval RETURN_SUCCESS            The PE/COFF image was unloaded successfully.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+PeCoffLoaderUnloadImage (\r
+  IN PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
+  )\r
+;\r
 #endif\r