ldrNative.cpp revision 60a466065a08e0907b606a77fd46cbf6035f3b42
/* $Id$ */
/** @file
* innotek Portable Runtime - Binary Image Loader, Native interface.
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP RTLOGGROUP_LDR
/** @copydoc RTLDROPS::pfnEnumSymbols */
static DECLCALLBACK(int) rtldrNativeEnumSymbols(PRTLDRMODINTERNAL pMod, unsigned fFlags, const void *pvBits, RTUINTPTR BaseAddress,
{
return VERR_NOT_SUPPORTED;
}
/** @copydoc RTLDROPS::pfnDone */
{
return VINF_SUCCESS;
}
/**
* Operations for a native module.
*/
static const RTLDROPS s_rtldrNativeOps =
{
"native",
/* ext: */
NULL,
NULL,
NULL,
NULL,
42
};
/**
* Loads a dynamic load library (/shared object) image file using native
* OS facilities.
*
* the platform if it have been omitted. This means that it's not
* but that's not a bad tradeoff.
*
* If no path is specified in the filename, the OS will usually search it's library
* path to find the image file.
*
* @returns iprt status code.
* @param pszFilename Image filename.
* @param phLdrMod Where to store the handle to the loaded module.
*/
{
/*
* validate input.
*/
/*
* Allocate and initialize module structure.
*/
int rc = VERR_NO_MEMORY;
if (pMod)
{
/*
* Attempt to open the module.
*/
if (RT_SUCCESS(rc))
{
return rc;
}
}
*phLdrMod = NIL_RTLDRMOD;
return rc;
}