#include <Base.h>
#include <IndustryStandard/AppleKxldState.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/OcMachoLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcXmlLib.h>
#include "PrelinkedInternal.h"
Go to the source code of this file.
Functions | |
STATIC CONST KXLD_LINK_STATE_HEADER * | InternalGetKxldHeader (IN CONST VOID *KxldState, IN UINT32 KxldStateSize, IN MACH_CPU_TYPE CpuType) |
STATIC CONST KXLD_VTABLE_HEADER * | InternalGetKxldVtables (IN CONST VOID *KxldState, IN UINT32 KxldStateSize, IN MACH_CPU_TYPE CpuType, OUT UINT32 *NumVtables) |
STATIC CONST VOID * | InternalGetKxldSymbols (IN CONST VOID *KxldState, IN UINT32 KxldStateSize, IN MACH_CPU_TYPE CpuType, OUT UINT32 *NumSymbols) |
STATIC CONST CHAR8 * | InternalGetKxldString (IN CONST VOID *KxldState, IN UINT32 KxldStateSize, IN UINT32 Offset) |
EFI_STATUS | InternalKxldStateBuildLinkedSymbolTable (IN OUT PRELINKED_KEXT *Kext, IN PRELINKED_CONTEXT *Context) |
EFI_STATUS | InternalKxldStateBuildLinkedVtables (IN OUT PRELINKED_KEXT *Kext, IN PRELINKED_CONTEXT *Context) |
STATIC EFI_STATUS | InternalKxldStateRebasePlist (IN OUT PRELINKED_CONTEXT *Context, IN INT64 Delta) |
EFI_STATUS | InternalKxldStateRebuild (IN OUT PRELINKED_CONTEXT *Context) |
UINT64 | InternalKxldSolveSymbol (IN BOOLEAN Is32Bit, IN CONST VOID *KxldState, IN UINT32 KxldStateSize, IN CONST CHAR8 *Name) |
Copyright (C) 2020, vit9696. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file KxldState.c.
STATIC CONST KXLD_LINK_STATE_HEADER * InternalGetKxldHeader | ( | IN CONST VOID * | KxldState, |
IN UINT32 | KxldStateSize, | ||
IN MACH_CPU_TYPE | CpuType ) |
Definition at line 32 of file KxldState.c.
STATIC CONST CHAR8 * InternalGetKxldString | ( | IN CONST VOID * | KxldState, |
IN UINT32 | KxldStateSize, | ||
IN UINT32 | Offset ) |
Definition at line 164 of file KxldState.c.
STATIC CONST VOID * InternalGetKxldSymbols | ( | IN CONST VOID * | KxldState, |
IN UINT32 | KxldStateSize, | ||
IN MACH_CPU_TYPE | CpuType, | ||
OUT UINT32 * | NumSymbols ) |
Definition at line 118 of file KxldState.c.
STATIC CONST KXLD_VTABLE_HEADER * InternalGetKxldVtables | ( | IN CONST VOID * | KxldState, |
IN UINT32 | KxldStateSize, | ||
IN MACH_CPU_TYPE | CpuType, | ||
OUT UINT32 * | NumVtables ) |
Definition at line 60 of file KxldState.c.
UINT64 InternalKxldSolveSymbol | ( | IN BOOLEAN | Is32Bit, |
IN CONST VOID * | KxldState, | ||
IN UINT32 | KxldStateSize, | ||
IN CONST CHAR8 * | Name ) |
Solve symbol through KXLD state.
[in] | Is32Bit | KXLD is 32-bit. |
[in] | KxldState | KXLD state. |
[in] | KxldStateSize | KXLD state size. |
[in] | Name | Symbol name. |
Address | on success. |
0 | on failure. |
Definition at line 579 of file KxldState.c.
EFI_STATUS InternalKxldStateBuildLinkedSymbolTable | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN PRELINKED_CONTEXT * | Context ) |
Build symbol table from KXLD state.
[in,out] | Kext | Kext dependency. |
[in] | Context | Prelinking context. |
EFI_SUCCESS | on success. |
Definition at line 192 of file KxldState.c.
EFI_STATUS InternalKxldStateBuildLinkedVtables | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN PRELINKED_CONTEXT * | Context ) |
Build virtual tables from KXLD state.
[in,out] | Kext | Kext dependency. |
[in] | Context | Prelinking context. |
EFI_SUCCESS | on success. |
Definition at line 292 of file KxldState.c.
STATIC EFI_STATUS InternalKxldStateRebasePlist | ( | IN OUT PRELINKED_CONTEXT * | Context, |
IN INT64 | Delta ) |
Definition at line 400 of file KxldState.c.
EFI_STATUS InternalKxldStateRebuild | ( | IN OUT PRELINKED_CONTEXT * | Context | ) |
Update KXLD state in the resulting image.
[in,out] | Context | Prelinking context. |
EFI_SUCCESS | on success. |
Definition at line 459 of file KxldState.c.