mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-22 17:27:44 +02:00
ImageTool: Update RelocateImage internal prototype
This commit is contained in:
parent
c6265d1374
commit
e239aed80d
@ -96,10 +96,10 @@ UefiImageLoaderGetRuntimeContextSizePe (
|
|||||||
|
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
UefiImageRelocateImagePe (
|
UefiImageRelocateImagePe (
|
||||||
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,
|
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,
|
||||||
IN UINT64 BaseAddress,
|
IN UINT64 BaseAddress,
|
||||||
OUT UEFI_IMAGE_LOADER_RUNTIME_CONTEXT *RuntimeContext OPTIONAL,
|
OUT VOID *RuntimeContext OPTIONAL,
|
||||||
IN UINT32 RuntimeContextSize
|
IN UINT32 RuntimeContextSize
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return PeCoffRelocateImage (
|
return PeCoffRelocateImage (
|
||||||
|
@ -71,10 +71,10 @@ RETURN_STATUS
|
|||||||
typedef
|
typedef
|
||||||
RETURN_STATUS
|
RETURN_STATUS
|
||||||
(*UEFI_IMAGE_RELOCARE_IMAGE) (
|
(*UEFI_IMAGE_RELOCARE_IMAGE) (
|
||||||
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,
|
IN OUT UEFI_IMAGE_LOADER_IMAGE_CONTEXT *Context,
|
||||||
IN UINT64 BaseAddress,
|
IN UINT64 BaseAddress,
|
||||||
OUT UEFI_IMAGE_LOADER_RUNTIME_CONTEXT *RuntimeContext OPTIONAL,
|
OUT VOID *RuntimeContext OPTIONAL,
|
||||||
IN UINT32 RuntimeContextSize
|
IN UINT32 RuntimeContextSize
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
|
@ -285,12 +285,16 @@ UefiImageRelocateImage (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
RETURN_STATUS Status;
|
RETURN_STATUS Status;
|
||||||
|
VOID *FormatContext;
|
||||||
|
UINT32 FormatContextSize;
|
||||||
|
|
||||||
|
FormatContext = RuntimeContext;
|
||||||
|
FormatContextSize = RuntimeContextSize;
|
||||||
if (RuntimeContext != NULL) {
|
if (RuntimeContext != NULL) {
|
||||||
*(UINT64 *)RuntimeContext = Context->FormatIndex;
|
*(UINT64 *)RuntimeContext = Context->FormatIndex;
|
||||||
RuntimeContext = (UEFI_IMAGE_LOADER_RUNTIME_CONTEXT *)((UINT64 *)RuntimeContext + 1);
|
FormatContext = (VOID *)((UINT64 *)RuntimeContext + 1);
|
||||||
ASSERT (RuntimeContextSize >= 8);
|
ASSERT (FormatContextSize >= 8);
|
||||||
RuntimeContextSize -= 8;
|
FormatContextSize -= 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
UEFI_IMAGE_EXEC (
|
UEFI_IMAGE_EXEC (
|
||||||
@ -299,8 +303,8 @@ UefiImageRelocateImage (
|
|||||||
RelocateImage,
|
RelocateImage,
|
||||||
Context,
|
Context,
|
||||||
BaseAddress,
|
BaseAddress,
|
||||||
RuntimeContext,
|
FormatContext,
|
||||||
RuntimeContextSize
|
FormatContextSize
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!RETURN_ERROR (Status)) {
|
if (!RETURN_ERROR (Status)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user