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