mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-25 18:48:42 +02:00
MdePkg/BasePeCoffLib2: Move ExtraAction to UefiImageLib
This commit is contained in:
parent
0cd5908c7f
commit
b74a1336a5
@ -34,7 +34,6 @@
|
|||||||
BaseOverflowLib
|
BaseOverflowLib
|
||||||
DebugLib
|
DebugLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
UefiImageExtraActionLib
|
|
||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderRtRelocAllowTargetMismatch
|
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderRtRelocAllowTargetMismatch
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/BaseOverflowLib.h>
|
#include <Library/BaseOverflowLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/UefiImageExtraActionLib.h>
|
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PeCoffLib2.h>
|
#include <Library/PeCoffLib2.h>
|
||||||
|
|
||||||
@ -451,7 +450,6 @@ PeCoffRelocateImage (
|
|||||||
// Verify the Relocation Directory is not empty.
|
// Verify the Relocation Directory is not empty.
|
||||||
//
|
//
|
||||||
if (Context->RelocDirSize == 0) {
|
if (Context->RelocDirSize == 0) {
|
||||||
UefiImageLoaderRelocateImageExtraAction (Context);
|
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -467,7 +465,6 @@ PeCoffRelocateImage (
|
|||||||
// prefered location.
|
// prefered location.
|
||||||
//
|
//
|
||||||
if (RuntimeContext == NULL && Adjust == 0) {
|
if (RuntimeContext == NULL && Adjust == 0) {
|
||||||
UefiImageLoaderRelocateImageExtraAction (Context);
|
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -623,7 +620,6 @@ PeCoffRelocateImage (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
UefiImageLoaderRelocateImageExtraAction (Context);
|
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
DebugLib
|
DebugLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
PeCoffLib2
|
PeCoffLib2
|
||||||
|
UefiImageExtraActionLib
|
||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAlignmentPolicy
|
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAlignmentPolicy
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
DebugLib
|
DebugLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
UeImageLib
|
UeImageLib
|
||||||
|
UefiImageExtraActionLib
|
||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdDebugRaisePropertyMask
|
gEfiMdePkgTokenSpaceGuid.PcdDebugRaisePropertyMask
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/PeCoffLib2.h>
|
#include <Library/PeCoffLib2.h>
|
||||||
#include <Library/UefiImageLib.h>
|
#include <Library/UefiImageLib.h>
|
||||||
|
#include <Library/UefiImageExtraActionLib.h>
|
||||||
|
|
||||||
#include "PeCoffSupport.h"
|
#include "PeCoffSupport.h"
|
||||||
|
|
||||||
@ -106,12 +107,19 @@ UefiImageRelocateImage (
|
|||||||
IN UINT32 RuntimeContextSize
|
IN UINT32 RuntimeContextSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return PeCoffRelocateImage (
|
RETURN_STATUS Status;
|
||||||
|
|
||||||
|
Status = PeCoffRelocateImage (
|
||||||
Context,
|
Context,
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
RuntimeContext,
|
RuntimeContext,
|
||||||
RuntimeContextSize
|
RuntimeContextSize
|
||||||
);
|
);
|
||||||
|
if (!RETURN_ERROR (Status)) {
|
||||||
|
UefiImageLoaderRelocateImageExtraAction (Context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
#include <Library/UeImageLib.h>
|
#include <Library/UeImageLib.h>
|
||||||
#include <Library/UefiImageLib.h>
|
#include <Library/UefiImageLib.h>
|
||||||
|
#include <Library/UefiImageExtraActionLib.h>
|
||||||
|
|
||||||
#include "UeSupport.h"
|
#include "UeSupport.h"
|
||||||
|
|
||||||
@ -100,10 +101,14 @@ UefiImageRelocateImage (
|
|||||||
IN UINT32 RuntimeContextSize
|
IN UINT32 RuntimeContextSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return UeRelocateImage (
|
RETURN_STATUS Status;
|
||||||
Context,
|
|
||||||
BaseAddress
|
Status = UeRelocateImage (Context, BaseAddress);
|
||||||
);
|
if (!RETURN_ERROR (Status)) {
|
||||||
|
UefiImageLoaderRelocateImageExtraAction (Context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user