mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
Add forgotten prelink size update after injection
This commit is contained in:
parent
44315e1659
commit
1818c06e9a
@ -12958,16 +12958,16 @@ CalculateReserveSize (
|
||||
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CheckPrelinked (
|
||||
TestInjectPrelinked (
|
||||
IN OUT UINT8 *Kernel,
|
||||
IN UINT32 KernelSize,
|
||||
IN UINT32 *KernelSize,
|
||||
IN UINT32 AllocatedSize
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
PRELINKED_CONTEXT Context;
|
||||
|
||||
Status = PrelinkedContextInit (&Context, Kernel, KernelSize, AllocatedSize);
|
||||
Status = PrelinkedContextInit (&Context, Kernel, *KernelSize, AllocatedSize);
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PrelinkedInjectPrepare (&Context);
|
||||
@ -13005,6 +13005,8 @@ CheckPrelinked (
|
||||
DEBUG ((DEBUG_WARN, "Plist inject prepare error - %r\n", Status));
|
||||
}
|
||||
|
||||
*KernelSize = Context.PrelinkedSize;
|
||||
|
||||
PrelinkedContextFree (&Context);
|
||||
}
|
||||
|
||||
@ -13067,7 +13069,7 @@ TestFileOpen (
|
||||
// TODO: patches, dropping, and injection here.
|
||||
//
|
||||
|
||||
PrelinkedStatus = CheckPrelinked (Kernel, KernelSize, AllocatedSize);
|
||||
PrelinkedStatus = TestInjectPrelinked (Kernel, &KernelSize, AllocatedSize);
|
||||
|
||||
DEBUG ((DEBUG_WARN, "Prelinked status - %r\n", PrelinkedStatus));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user