VirtualBox

Changeset 79559 in vbox for trunk/include/iprt/ldr.h


Ignore:
Timestamp:
Jul 5, 2019 3:42:51 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/process-creation-posix.cpp: Try to dynamically resolve crypt_r on linux. [adjustments] ticketref:18682

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/ldr.h

    r77971 r79559  
    278278RTDECL(int) RTLdrLoadEx(const char *pszFilename, PRTLDRMOD phLdrMod, uint32_t fFlags, PRTERRINFO pErrInfo);
    279279
    280 /** @defgroup RTLDRLOAD_FLAGS_XXX RTLdrLoadEx flags.
     280/** @defgroup RTLDRLOAD_FLAGS_XXX Flags for RTLdrLoadEx, RTLdrLoadSystemEx and RTLdrGetSystemSymbolEx
    281281 * @{ */
    282282/** Symbols defined in this library are not made available to resolve
     
    294294/** Do not append default suffix.   */
    295295#define RTLDRLOAD_FLAGS_NO_SUFFIX               RT_BIT_32(3)
    296 /** The mask of valid flag bits. */
     296/** Shift for the first .so.MAJOR version number to try.
     297 * Only applicable to RTLdrLoadSystemEx() and RTLdrGetSystemSymbolEx(). */
     298#define RTLDRLOAD_FLAGS_SO_VER_BEGIN_SHIFT        12
     299/** Mask for the first .so.MAJOR version number to try.
     300 * Only applicable to RTLdrLoadSystemEx() and RTLdrGetSystemSymbolEx(). */
     301#define RTLDRLOAD_FLAGS_SO_VER_BEGIN_MASK         UINT32_C(0x003ff000)
     302/** Shift for the end .so.MAJOR version number (exclusive).
     303 * Only applicable to RTLdrLoadSystemEx() and RTLdrGetSystemSymbolEx(). */
     304#define RTLDRLOAD_FLAGS_SO_VER_END_SHIFT        22
     305/** Mask for the end .so.MAJOR version number (exclusive).
     306 * Only applicable to RTLdrLoadSystemEx() and RTLdrGetSystemSymbolEx(). */
     307#define RTLDRLOAD_FLAGS_SO_VER_END_MASK         UINT32_C(0xffc00000)
     308/** Specifies the range for the .so.MAJOR version number.
     309 * Only applicable to RTLdrLoadSystemEx() and RTLdrGetSystemSymbolEx().
     310 * Ignored on systems not using .so.
     311 * @param a_uBegin  The first version to try.
     312 * @param a_uEnd    The version number to stop at (exclusive).
     313 */
     314#define RTLDRLOAD_FLAGS_SO_VER_RANGE(a_uBegin, a_uEnd) \
     315    ( ((a_uBegin) << RTLDRLOAD_FLAGS_SO_VER_BEGIN_SHIFT) | ((a_uEnd) << RTLDRLOAD_FLAGS_SO_VER_END_SHIFT) )
     316/** The mask of valid flag bits.
     317 * The shared object major version range is excluded. */
    297318#define RTLDRLOAD_FLAGS_VALID_MASK              UINT32_C(0x0000000f)
    298319/** @} */
     
    312333
    313334/**
     335 * Loads a dynamic load library (/shared object) image file residing in one of
     336 * the default system library locations, extended version.
     337 *
     338 * Only the system library locations are searched. No suffix is required.
     339 *
     340 * @returns iprt status code.
     341 * @param   pszFilename Image filename. No path.
     342 * @param   fFlags      RTLDRLOAD_FLAGS_XXX, including RTLDRLOAD_FLAGS_SO_VER_XXX.
     343 * @param   phLdrMod    Where to store the handle to the loaded module.
     344 */
     345RTDECL(int) RTLdrLoadSystemEx(const char *pszFilename, uint32_t fFlags, PRTLDRMOD phLdrMod);
     346
     347/**
    314348 * Combines RTLdrLoadSystem and RTLdrGetSymbol, with fNoUnload set to true.
    315349 *
     
    317351 *          status, go thru the necessary API calls yourself.)
    318352 * @param   pszFilename Image filename. No path.
    319  * @param   pszSymbol       Symbol name.
     353 * @param   pszSymbol   Symbol name.
    320354 */
    321355RTDECL(void *) RTLdrGetSystemSymbol(const char *pszFilename, const char *pszSymbol);
     356
     357/**
     358 * Combines RTLdrLoadSystemEx and RTLdrGetSymbol.
     359 *
     360 * @returns The symbol value, NULL on failure.  (If you care for a less boolean
     361 *          status, go thru the necessary API calls yourself.)
     362 * @param   pszFilename Image filename. No path.
     363 * @param   pszSymbol   Symbol name.
     364 * @param   fFlags      RTLDRLOAD_FLAGS_XXX, including RTLDRLOAD_FLAGS_SO_VER_XXX.
     365 */
     366RTDECL(void *) RTLdrGetSystemSymbolEx(const char *pszFilename, const char *pszSymbol, uint32_t fFlags);
    322367
    323368/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette