1. Replace PeCoffLoader library by PeCoff lib for PeiCore, DxeIpl and DxeMain.

2. Add three PeCoff library instances for NT32 PeImage load.
3. Update PeCoffGetEntryPointLib to support TeImage.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3965 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2007-09-28 08:14:30 +00:00
parent 64253026df
commit 3d7b0992fc
21 changed files with 1188 additions and 246 deletions

View File

@@ -82,6 +82,7 @@ Revision History
#include <Library/PeCoffLoaderLib.h>
#include <Library/CacheMaintenanceLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PeCoffLib.h>
#include "DebugImageInfo.h"
#include "Library.h"

View File

@@ -78,7 +78,6 @@
[LibraryClasses]
BaseMemoryLib
CacheMaintenanceLib
PeCoffLoaderLib
UefiDecompressLib
CustomDecompressLib
PerformanceLib
@@ -87,6 +86,7 @@
UefiLib
DebugLib
DxeCoreEntryPoint
PeCoffLib
[Guids]
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED

View File

@@ -25,7 +25,6 @@ Abstract:
// DXE Core Global Variables for Protocols from PEI
//
EFI_HANDLE mDecompressHandle = NULL;
EFI_PEI_PE_COFF_LOADER_PROTOCOL *gEfiPeiPeCoffLoader = NULL;
//
// DXE Core globals for Architecture Protocols
@@ -370,9 +369,6 @@ Returns:
);
ASSERT_EFI_ERROR (Status);
gEfiPeiPeCoffLoader = GetPeCoffLoaderProtocol ();
ASSERT (gEfiPeiPeCoffLoader != NULL);
//
// Register for the GUIDs of the Architectural Protocols, so the rest of the
// EFI Boot Services and EFI Runtime Services tables can be filled in.

View File

@@ -213,7 +213,7 @@ Returns:
//
// Get information about the image being loaded
//
Status = gEfiPeiPeCoffLoader->GetImageInfo (gEfiPeiPeCoffLoader, &Image->ImageContext);
Status = PeCoffLoaderGetImageInfo (&Image->ImageContext);
if (EFI_ERROR (Status)) {
return Status;
}
@@ -305,7 +305,7 @@ Returns:
//
// Load the image from the file into the allocated memory
//
Status = gEfiPeiPeCoffLoader->LoadImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
Status = PeCoffLoaderLoadImage (&Image->ImageContext);
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -328,7 +328,7 @@ Returns:
//
// Relocate the image in memory
//
Status = gEfiPeiPeCoffLoader->RelocateImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
Status = PeCoffLoaderRelocateImage (&Image->ImageContext);
if (EFI_ERROR (Status)) {
goto Done;
}
@@ -1085,7 +1085,7 @@ Returns:
//
// Unload image, free Image->ImageContext->ModHandle
//
gEfiPeiPeCoffLoader->UnloadImage (gEfiPeiPeCoffLoader, &Image->ImageContext);
PeCoffLoaderUnloadImage (&Image->ImageContext);
//
// Free our references to the image handle