OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <IndustryStandard/AppleMachoImage.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/OcMachoLib.h>
#include "OcMachoLibInternal.h"
Go to the source code of this file.
Functions | |
BOOLEAN | MachoSymbolIsDefined (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol) |
BOOLEAN | MachoSymbolIsLocalDefined (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol) |
MACH_NLIST_ANY * | MachoGetLocalDefinedSymbolByName (IN OUT OC_MACHO_CONTEXT *Context, IN CONST CHAR8 *Name) |
MACH_NLIST_ANY * | MachoGetSymbolByIndex (IN OUT OC_MACHO_CONTEXT *Context, IN UINT32 Index) |
CONST CHAR8 * | MachoGetSymbolName (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol) |
CONST CHAR8 * | MachoGetIndirectSymbolName (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol) |
BOOLEAN | MachoIsSymbolValueInRange (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol) |
BOOLEAN | MachoGetSymbolByExternRelocationOffset (IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 Address, OUT MACH_NLIST_ANY **Symbol) |
BOOLEAN | MachoRelocateSymbol (IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 LinkAddress, IN OUT MACH_NLIST_ANY *Symbol) |
BOOLEAN | MachoSymbolGetFileOffset (IN OUT OC_MACHO_CONTEXT *Context, IN CONST MACH_NLIST_ANY *Symbol, OUT UINT32 *FileOffset, OUT UINT32 *MaxSize OPTIONAL) |
BOOLEAN | MachoSymbolGetDirectFileOffset (IN OUT OC_MACHO_CONTEXT *Context, IN UINT64 Address, OUT UINT32 *FileOffset, OUT UINT32 *MaxSize OPTIONAL) |
Provides services for symbols.
Copyright (c) 2018, Download-Fritz. 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 Symbols.c.
CONST CHAR8 * MachoGetIndirectSymbolName | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol ) |
MACH_NLIST_ANY * MachoGetLocalDefinedSymbolByName | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST CHAR8 * | Name ) |
BOOLEAN MachoGetSymbolByExternRelocationOffset | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN UINT64 | Address, | ||
OUT MACH_NLIST_ANY ** | Symbol ) |
Retrieves the symbol referenced by the extern Relocation targeting Address.
[in,out] | Context | Context of the Mach-O. |
[in] | Address | Address to search for. |
[out] | Symbol | Buffer to output the symbol referenced by the Relocation into. The output is undefined when FALSE is returned. May be NULL. |
MACH_NLIST_ANY * MachoGetSymbolByIndex | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN UINT32 | Index ) |
CONST CHAR8 * MachoGetSymbolName | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol ) |
BOOLEAN MachoIsSymbolValueInRange | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol ) |
BOOLEAN MachoRelocateSymbol | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN UINT64 | LinkAddress, | ||
IN OUT MACH_NLIST_ANY * | Symbol ) |
BOOLEAN MachoSymbolGetDirectFileOffset | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN UINT64 | Address, | ||
OUT UINT32 * | FileOffset, | ||
OUT UINT32 *MaxSize | OPTIONAL ) |
Retrieves the Mach-O file offset of the address pointed to by a Symbol.
[in,out] | Context | Context of the Mach-O. |
[in] | Address | Virtual address to retrieve the offset of. |
[out] | FileOffset | Pointer the file offset is returned into. If FALSE is returned, the output is undefined. |
[out] | MaxSize | Maximum data safely available from FileOffset. |
0 | 0 is returned on failure. |
BOOLEAN MachoSymbolGetFileOffset | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol, | ||
OUT UINT32 * | FileOffset, | ||
OUT UINT32 *MaxSize | OPTIONAL ) |
Retrieves the Mach-O file offset of the address pointed to by a Symbol.
[in,out] | Context | Context of the Mach-O. |
[in] | Symbol | Symbol to retrieve the offset of. |
[out] | FileOffset | Pointer the file offset is returned into. If FALSE is returned, the output is undefined. |
[out] | MaxSize | Maximum data safely available from FileOffset. |
0 | 0 is returned on failure. |
BOOLEAN MachoSymbolIsDefined | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol ) |
BOOLEAN MachoSymbolIsLocalDefined | ( | IN OUT OC_MACHO_CONTEXT * | Context, |
IN CONST MACH_NLIST_ANY * | Symbol ) |