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

kLdrModPE.c File Reference


Detailed Description

kLdr - The Module Interpreter for the Portable Executable (PE) Format.

Definition in file kLdrModPE.c.

#include <k/kLdr.h>
#include "kLdrInternal.h"
#include <k/kLdrFmts/pe.h>

Go to the source code of this file.

Classes

struct  KLDRMODPE

Defines

#define KLDRMODPE_ASSERT(expr)   kHlpAssert(expr)
#define KLDRMODPE_RVA2TYPE(pvBits, uRVA, type)   ( (type) ((KUPTR)(pvBits) + (KUPTR)(uRVA)) )
#define KLDRMODPE_STRICT   1
#define KLDRMODPE_VALID_RVA(pModPE, uRVA)   ( (uRVA) && (uRVA) < (pModPE)->Hdrs.OptionalHeader.SizeOfImage )

Typedefs

typedef struct KLDRMODPEPKLDRMODPE

Functions

static int kldrModPEAllocTLS (PKLDRMOD pMod)
static int kldrModPEBitsAndBaseAddress (PKLDRMODPE pModPE, const void **ppvBits, PKLDRADDR pBaseAddress)
static int kldrModPECallInit (PKLDRMOD pMod, KUPTR uHandle)
static int kldrModPECallTerm (PKLDRMOD pMod, KUPTR uHandle)
static int kldrModPECallThread (PKLDRMOD pMod, KUPTR uHandle, unsigned fAttachingOrDetaching)
static int kldrModPECreate (PCKLDRMODOPS pOps, PKRDR pRdr, KLDRFOFF offNewHdr, PPKLDRMOD ppMod)
static int kldrModPEDestroy (PKLDRMOD pMod)
static KI32 kldrModPEDoCall (KUPTR uEntrypoint, KUPTR uHandle, KU32 uOp, void *pvReserved)
static int kldrModPEDoCallDLL (PKLDRMODPE pModPE, unsigned uOp, KUPTR uHandle)
static int kldrModPEDoCallTLS (PKLDRMODPE pModPE, unsigned uOp, KUPTR uHandle)
static int kldrModPEDoCreate (PKRDR pRdr, KLDRFOFF offNewHdr, PKLDRMODPE *ppMod)
static int kldrModPEDoFixups (PKLDRMODPE pModPE, void *pvMapping, KLDRADDR NewBaseAddress, KLDRADDR OldBaseAddress)
static int kldrModPEDoForwarderQuery (PKLDRMODPE pModPE, const void *pvBits, const char *pszForwarder, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser, PKLDRADDR puValue, KU32 *pfKind)
static int kldrModPEDoImports (PKLDRMODPE pModPE, void *pvMapping, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModPEDoImports32Bit (PKLDRMODPE pModPE, void *pvMapping, const IMAGE_IMPORT_DESCRIPTOR *pImpDesc, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModPEDoImports64Bit (PKLDRMODPE pModPE, void *pvMapping, const IMAGE_IMPORT_DESCRIPTOR *pImpDesc, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModPEDoMap (PKLDRMODPE pModPE, unsigned fForReal)
static void kldrModPEDoOptionalHeaderConversion (PIMAGE_OPTIONAL_HEADER64 pOptionalHeader)
static int kLdrModPEDoOptionalHeaderValidation (PKLDRMODPE pModPE)
static int kLdrModPEDoSectionHeadersValidation (PKLDRMODPE pModPE)
static int kldrModPEDoUnmap (PKLDRMODPE pModPE, const void *pvMapping)
static int kldrModPEEnumDbgInfo (PKLDRMOD pMod, const void *pvBits, PFNKLDRENUMDBG pfnCallback, void *pvUser)
static int kldrModPEEnumSymbols (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, KU32 fFlags, PFNKLDRMODENUMSYMS pfnCallback, void *pvUser)
static int kldrModPEFixupMapping (PKLDRMOD pMod, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static void kldrModPEFreeTLS (PKLDRMOD pMod)
static int kldrModPEGetBits (PKLDRMOD pMod, void *pvBits, KLDRADDR BaseAddress, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static int kldrModPEGetImport (PKLDRMOD pMod, const void *pvBits, KU32 iImport, char *pszName, KSIZE cchName)
static int kldrModPEGetStackInfo (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRSTACKINFO pStackInfo)
static int kldrModPEHasDbgInfo (PKLDRMOD pMod, const void *pvBits)
static int kldrModPEMap (PKLDRMOD pMod)
static KI32 kldrModPENumberOfImports (PKLDRMOD pMod, const void *pvBits)
static int kldrModPEQueryMainEntrypoint (PKLDRMOD pMod, const void *pvBits, KLDRADDR BaseAddress, PKLDRADDR pMainEPAddress)
static int kldrModPEQuerySymbol (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 kldrModPEReload (PKLDRMOD pMod)
static int kldrModPERelocateBits (PKLDRMOD pMod, void *pvBits, KLDRADDR NewBaseAddress, KLDRADDR OldBaseAddress, PFNKLDRMODGETIMPORT pfnGetImport, void *pvUser)
static KLDRADDR kldrModPESize (PKLDRMOD pMod)
static int kldrModPEUnmap (PKLDRMOD pMod)

Variables

KLDRMODOPS g_kLdrModPEOps


Generated by  Doxygen 1.6.0   Back to index