Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

Classes | Defines | Typedefs | Functions | Variables

kLdrModMachO.c File Reference

#include <k/kLdr.h>
#include "kLdrInternal.h"
#include <k/kLdrFmts/mach-o.h>
Include dependency graph for kLdrModMachO.c:

Go to the source code of this file.

Classes

struct  KLDRMODMACHO
struct  KLDRMODMACHOSECT
struct  KLDRMODMACHOSEG

Defines

#define KLDRMODMACHO_ASSERT(expr)   kHlpAssert(expr)
#define KLDRMODMACHO_CHECK_RETURN(expr, rc)   do { if (!(expr)) { return (rc); } } while (0)
#define KLDRMODMACHO_STRICT   1

Typedefs

typedef struct KLDRMODMACHO KLDRMODMACHO
typedef struct KLDRMODMACHOSECT KLDRMODMACHOSECT
typedef struct KLDRMODMACHOSEG KLDRMODMACHOSEG
typedef struct KLDRMODMACHOPKLDRMODMACHO
typedef struct KLDRMODMACHOSECTPKLDRMODMACHOSECT
typedef struct KLDRMODMACHOSEGPKLDRMODMACHOSEG

Functions

static int kldrModMachOAdjustBaseAddress (PKLDRMODMACHO pModMachO, PKLDRADDR pBaseAddress)
static int kldrModMachOAllocTLS (PKLDRMOD pMod)
static int kldrModMachOCallInit (PKLDRMOD pMod, KUPTR uHandle)
static int kldrModMachOCallTerm (PKLDRMOD pMod, KUPTR uHandle)
static int kldrModMachOCallThread (PKLDRMOD pMod, KUPTR uHandle, unsigned fAttachingOrDetaching)
static int kldrModMachOCreate (PCKLDRMODOPS pOps, PKRDR pRdr, KU32 fFlags, KCPUARCH enmCpuArch, KLDRFOFF offNewHdr, PPKLDRMOD ppMod)
static int kldrModMachODestroy (PKLDRMOD pMod)
static int kldrModMachODoCreate (PKRDR pRdr, KLDRFOFF offImage, PKLDRMODMACHO *ppMod)
static int kldrModMachODoEnumSymbols32Bit (PKLDRMODMACHO pModMachO, const macho_nlist_32_t *paSyms, KU32 cSyms, const char *pchStrings, KU32 cchStrings, KLDRADDR BaseAddress, KU32 fFlags, PFNKLDRMODENUMSYMS pfnCallback, void *pvUser)
static int kldrModMachODoEnumSymbols64Bit (PKLDRMODMACHO pModMachO, const macho_nlist_64_t *paSyms, KU32 cSyms, const char *pchStrings, KU32 cchStrings, KLDRADDR BaseAddress, KU32 fFlags, PFNKLDRMODENUMSYMS pfnCallback, void *pvUser)
static int kldrModMachODoQuerySymbol32Bit (PKLDRMODMACHO pModMachO, const macho_nlist_32_t *paSyms, KU32 cSyms, const char *pchStrings, KU32 cchStrings, KLDRADDR BaseAddress, KU32 iSymbol, const char *pchSymbol, KSIZE cchSymbol, PKLDRADDR puValue, KU32 *pfKind)
static int kldrModMachODoQuerySymbol64Bit (PKLDRMODMACHO pModMachO, const macho_nlist_64_t *paSyms, KU32 cSyms, const char *pchStrings, KU32 cchStrings, KLDRADDR BaseAddress, KU32 iSymbol, const char *pchSymbol, KSIZE cchSymbol, PKLDRADDR puValue, KU32 *pfKind)
static int kldrModMachOEnumDbgInfo (PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDBG pfnCallback, void *pvUser)
static int kldrModMachOEnumSymbols (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, KU32 fFlags, PFNKLDRMODENUMSYMS pfnCallback, void *pvUser)
static int kldrModMachOFixupMapping (PKLDRMOD pMod, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModMachOFixupSectionAMD64 (PKLDRMODMACHO pModMachO, KU8 *pbSectBits, PKLDRMODMACHOSECT pFixupSect, macho_nlist_64_t *paSyms, KU32 cSyms, KLDRADDR NewBaseAddress)
static int kldrModMachOFixupSectionGeneric32Bit (PKLDRMODMACHO pModMachO, KU8 *pbSectBits, PKLDRMODMACHOSECT pFixupSect, macho_nlist_32_t *paSyms, KU32 cSyms, KLDRADDR NewBaseAddress)
static void kldrModMachOFreeTLS (PKLDRMOD pMod)
static int kldrModMachOGetBits (PKLDRMOD pMod, void *pvBits, KLDRADDR BaseAddress, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModMachOGetImport (PKLDRMOD pMod, const void *pvBits, KU32 iImport, char *pszName, KSIZE cchName)
static int kldrModMachOGetStackInfo (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRSTACKINFO pStackInfo)
static int kldrModMachOHasDbgInfo (PKLDRMOD pMod, const void *pvBits)
static int kldrModMachOLoadFixups (PKLDRMODMACHO pModMachO, KLDRFOFF offFixups, KU32 cFixups, macho_relocation_info_t **ppaFixups)
static int kldrModMachOLoadObjSymTab (PKLDRMODMACHO pModMachO)
static int kldrModMachOMakeGOT (PKLDRMODMACHO pModMachO, void *pvBits, KLDRADDR NewBaseAddress)
static int kldrModMachOMap (PKLDRMOD pMod)
static int kldrModMachOMapVirginBits (PKLDRMODMACHO pModMachO)
static KI32 kldrModMachONumberOfImports (PKLDRMOD pMod, const void *pvBits)
static int kldrModMachOObjDoFixups (PKLDRMODMACHO pModMachO, void *pvMapping, KLDRADDR NewBaseAddress)
static int kldrModMachOObjDoImports (PKLDRMODMACHO pModMachO, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModMachOParseLoadCommands (PKLDRMODMACHO pModMachO, char *pbStringPool, KU32 cbStringPool)
static int kldrModMachOPreParseLoadCommands (KU8 *pbLoadCommands, const mach_header_32_t *pHdr, PKRDR pRdr, KLDRFOFF offImage, KU32 *pcSegments, KU32 *pcSections, KU32 *pcbStringPool)
static int kldrModMachOQueryMainEntrypoint (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRADDR pMainEPAddress)
static int kldrModMachOQuerySymbol (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, KU32 iSymbol, const char *pchSymbol, KSIZE cchSymbol, const char *pszVersion, PFNKLDRMODGETIMPORT pfnGetForwarder, void *pvUser, PKLDRADDR puValue, KU32 *pfKind)
static int kldrModMachOReload (PKLDRMOD pMod)
static int kldrModMachORelocateBits (PKLDRMOD pMod, void *pvBits, KLDRADDR NewBaseAddress, KLDRADDR OldBaseAddress, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static KLDRADDR kldrModMachOSize (PKLDRMOD pMod)
static int kldrModMachOUnmap (PKLDRMOD pMod)

Variables

KLDRMODOPS g_kLdrModMachOOps

Detailed Description

kLdr - The Module Interpreter for the MACH-O format.

Definition in file kLdrModMachO.c.


Generated by  Doxygen 1.6.0   Back to index