mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-28 17:08:18 +01:00
78 lines
1.8 KiB
C
78 lines
1.8 KiB
C
/**
|
|
Private data of OcMachoLib.
|
|
|
|
Copyright (C) 2018, Download-Fritz. All rights reserved.<BR>
|
|
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.
|
|
|
|
**/
|
|
|
|
#ifndef OC_MACHO_LIB_INTERNAL_H_
|
|
#define OC_MACHO_LIB_INTERNAL_H_
|
|
|
|
#include <IndustryStandard/AppleMachoImage.h>
|
|
|
|
#include <Library/MachoLib.h>
|
|
|
|
/**
|
|
Retrieves the SYMTAB command.
|
|
|
|
@param[in] Context Context of the Mach-O.
|
|
|
|
@retval NULL NULL is returned on failure.
|
|
**/
|
|
BOOLEAN
|
|
InternalRetrieveSymtabs64 (
|
|
IN OUT OC_MACHO_CONTEXT *Context
|
|
);
|
|
|
|
/**
|
|
Retrieves an extern Relocation by the address it targets.
|
|
|
|
@param[in,out] Context Context of the Mach-O.
|
|
@param[in] Address The address to search for.
|
|
|
|
@retval NULL NULL is returned on failure.
|
|
**/
|
|
MACH_RELOCATION_INFO *
|
|
InternalGetExternRelocationByOffset (
|
|
IN OUT OC_MACHO_CONTEXT *Context,
|
|
IN UINT64 Address
|
|
);
|
|
|
|
/**
|
|
Retrieves a Relocation by the address it targets.
|
|
|
|
@param[in,out] Context Context of the Mach-O.
|
|
@param[in] Address The address to search for.
|
|
|
|
@retval NULL NULL is returned on failure.
|
|
|
|
**/
|
|
MACH_RELOCATION_INFO *
|
|
InternalGetLocalRelocationByOffset (
|
|
IN OUT OC_MACHO_CONTEXT *Context,
|
|
IN UINT64 Address
|
|
);
|
|
|
|
/**
|
|
Check symbol validity.
|
|
|
|
@param[in,out] Context Context of the Mach-O.
|
|
@param[in] Symbol Symbol from some table.
|
|
|
|
@retval TRUE on success.
|
|
**/
|
|
BOOLEAN
|
|
InternalSymbolIsSane (
|
|
IN OUT OC_MACHO_CONTEXT *Context,
|
|
IN CONST MACH_NLIST_64 *Symbol
|
|
);
|
|
|
|
#endif // OC_MACHO_LIB_INTERNAL_H_
|