VirtualBox

Changeset 16933 in vbox


Ignore:
Timestamp:
Feb 18, 2009 11:42:57 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43082
Message:

IPRT/PDM,SUPLIb,REM: Extended RTLdrOpen with an architecture argument for use with FAT R0.r0 images later some day. Also added fFlags argument that's currently MBZ case.

Location:
trunk
Files:
17 edited

Legend:

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

    r16761 r16933  
    854854/** The image base address is to high for this image type. */
    855855#define VERR_IMAGE_BASE_TOO_HIGH                (-614)
     856/** Mismatching architecture. */
     857#define VERR_LDR_ARCH_MISMATCH                  (-615)
    856858/** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
    857859#define VERR_LDRPE_DELAY_IMPORT                 (-620)
  • trunk/include/iprt/ldr.h

    r12423 r16933  
    8181
    8282/**
    83  * Open a binary image file.
     83 * Image architecuture specifier for RTLdrOpenEx.
     84 */
     85typedef enum RTLDRARCH
     86{
     87    RTLDRARCH_INVALID = 0,
     88    /** Whatever. */
     89    RTLDRARCH_WHATEVER,
     90    /** The host architecture. */
     91    RTLDRARCH_HOST,
     92    /** 32-bit x86. */
     93    RTLDRARCH_X86_32,
     94    /** AMD64 (64-bit x86 if you like). */
     95    RTLDRARCH_AMD64,
     96    /** End of the valid values. */
     97    RTLDRARCH_END,
     98    /** Make sure the type is a full 32-bit. */
     99    RTLDRARCH_32BIT_HACK = 0x7fffffff
     100} RTLDRARCH;
     101/** Pointer to a RTLDRARCH. */
     102typedef RTLDRARCH *PRTLDRARCH;
     103
     104/**
     105 * Open a binary image file, extended version.
    84106 *
    85107 * @returns iprt status code.
    86108 * @param   pszFilename Image filename.
     109 * @param   fFlags      Reserved, MBZ.
     110 * @param   enmArch     CPU architecture specifier for the image to be loaded.
    87111 * @param   phLdrMod    Where to store the handle to the loader module.
    88112 */
    89 RTDECL(int) RTLdrOpen(const char *pszFilename, PRTLDRMOD phLdrMod);
     113RTDECL(int) RTLdrOpen(const char *pszFilename, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod);
    90114
    91115/**
     
    95119 * @param   pszFilename     Image filename.
    96120 * @param   phLdrMod        Where to store the handle to the loaded module.
     121 * @param   fFlags      Reserved, MBZ.
     122 * @param   enmArch     CPU architecture specifier for the image to be loaded.
    97123 * @remark  Primarily for testing the loader.
    98124 */
    99 RTDECL(int) RTLdrOpenkLdr(const char *pszFilename, PRTLDRMOD phLdrMod);
     125RTDECL(int) RTLdrOpenkLdr(const char *pszFilename, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod);
    100126
    101127/**
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r15841 r16933  
    15301530     */
    15311531    RTLDRMOD hLdrMod;
    1532     int rc = RTLdrOpen(pszFilename, &hLdrMod);
     1532    int rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_HOST, &hLdrMod);
    15331533    if (!RT_SUCCESS(rc))
    15341534        return rc;
  • trunk/src/VBox/Runtime/common/ldr/ldrELF.cpp

    r8245 r16933  
    114114 * @returns iprt status code.
    115115 * @param   pReader     The loader reader instance which will provide the raw image bits.
     116 * @param   fFlags      Reserved, MBZ.
     117 * @param   enmArch     Architecture specifier.
    116118 * @param   phLdrMod    Where to store the handle.
    117119 */
    118 int rtldrELFOpen(PRTLDRREADER pReader, PRTLDRMOD phLdrMod)
     120int rtldrELFOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod)
    119121{
    120122    const char *pszLogName = pReader->pfnLogName(pReader); NOREF(pszLogName);
     
    145147    }
    146148    if (e_ident[EI_CLASS] == ELFCLASS32)
    147         rc = rtldrELF32Open(pReader, phLdrMod);
     149        rc = rtldrELF32Open(pReader, fFlags, enmArch, phLdrMod);
    148150    else
    149         rc = rtldrELF64Open(pReader, phLdrMod);
     151        rc = rtldrELF64Open(pReader, fFlags, enmArch, phLdrMod);
    150152    return rc;
    151153}
  • trunk/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h

    r14049 r16933  
    721721 * @param   cbRawImage  The size of the raw image.
    722722 */
    723 static int RTLDRELF_NAME(ValidateElfHeader)(const Elf_Ehdr *pEhdr, const char *pszLogName, uint64_t cbRawImage)
     723static int RTLDRELF_NAME(ValidateElfHeader)(const Elf_Ehdr *pEhdr, const char *pszLogName, uint64_t cbRawImage, PRTLDRARCH penmArch)
    724724{
    725725    Log3(("RTLdrELF:     e_ident: %.*Rhxs\n"
     
    806806        case EM_386:
    807807        case EM_486:
     808            *penmArch = RTLDRARCH_X86_32;
     809            break;
    808810#elif ELF_MODE == 64
    809811        case EM_X86_64:
     812            *penmArch = RTLDRARCH_AMD64;
     813            break;
    810814#endif
    811             break;
    812815        default:
    813816            Log(("RTLdrELF: %s: machine type %u is not supported!\n", pEhdr->e_machine));
     
    986989 * @returns iprt status code.
    987990 * @param   pReader     The loader reader instance which will provide the raw image bits.
     991 * @param   fFlags      Reserved, MBZ.
     992 * @param   enmArch     Architecture specifier.
    988993 * @param   phLdrMod    Where to store the handle.
    989994 */
    990 static int RTLDRELF_NAME(Open)(PRTLDRREADER pReader, PRTLDRMOD phLdrMod)
     995static int RTLDRELF_NAME(Open)(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod)
    991996{
    992997    const char *pszLogName = pReader->pfnLogName(pReader);
     
    10151020
    10161021    /*
    1017      * Read and validate the ELF header.
     1022     * Read and validate the ELF header and match up the CPU architecture.
    10181023     */
    10191024    int rc = pReader->pfnRead(pReader, &pModElf->Ehdr, sizeof(pModElf->Ehdr), 0);
    10201025    if (RT_SUCCESS(rc))
    1021         rc = RTLDRELF_NAME(ValidateElfHeader)(&pModElf->Ehdr, pszLogName, cbRawImage);
     1026    {
     1027        RTLDRARCH enmArchImage;
     1028        rc = RTLDRELF_NAME(ValidateElfHeader)(&pModElf->Ehdr, pszLogName, cbRawImage, &enmArchImage);
     1029        if (RT_SUCCESS(rc))
     1030        {
     1031            if (    enmArch != RTLDRARCH_WHATEVER
     1032                &&  enmArch != enmArchImage)
     1033                rc = VERR_LDR_ARCH_MISMATCH;
     1034        }
     1035    }
    10221036    if (RT_SUCCESS(rc))
    10231037    {
  • trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp

    r13837 r16933  
    4949 * @returns iprt status code.
    5050 * @param   pReader     The loader reader instance which will provide the raw image bits.
     51 * @param   fFlags      Reserved, MBZ.
     52 * @param   enmArch     Architecture specifier.
    5153 * @param   phMod       Where to store the handle.
    5254 */
    53 int rtldrOpenWithReader(PRTLDRREADER pReader, PRTLDRMOD phMod)
     55int rtldrOpenWithReader(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phMod)
    5456{
    5557    /*
     
    105107    if (uSign.u32 == IMAGE_NT_SIGNATURE)
    106108#ifdef LDR_WITH_PE
    107         rc = rtldrPEOpen(pReader, offHdr, phMod);
     109        rc = rtldrPEOpen(pReader, fFlags, enmArch, offHdr, phMod);
    108110#else
    109111        rc = VERR_PE_EXE_NOT_SUPPORTED;
     
    111113    else if (uSign.u32 == IMAGE_ELF_SIGNATURE)
    112114#if defined(LDR_WITH_ELF)
    113         rc = rtldrELFOpen(pReader, phMod);
     115        rc = rtldrELFOpen(pReader, fFlags, enmArch, phMod);
    114116#else
    115117        rc = VERR_ELF_EXE_NOT_SUPPORTED;
     
    117119    else if (uSign.au16[0] == IMAGE_LX_SIGNATURE)
    118120#ifdef LDR_WITH_LX
    119         rc = rtldrLXOpen(pReader, offHdr, phMod);
     121        rc = rtldrLXOpen(pReader, fFlags, enmArch, offHdr, phMod);
    120122#else
    121123        rc = VERR_LX_EXE_NOT_SUPPORTED;
     
    123125    else if (uSign.au16[0] == IMAGE_LE_SIGNATURE)
    124126#ifdef LDR_WITH_LE
    125         rc = rtldrLEOpen(pReader, phMod);
     127        rc = rtldrLEOpen(pReader, fFlags, enmArch, phMod);
    126128#else
    127129        rc = VERR_LE_EXE_NOT_SUPPORTED;
     
    129131    else if (uSign.au16[0] == IMAGE_NE_SIGNATURE)
    130132#ifdef LDR_WITH_NE
    131         rc = rtldrNEOpen(pReader, phMod);
     133        rc = rtldrNEOpen(pReader, fFlags, enmArch, phMod);
    132134#else
    133135        rc = VERR_NE_EXE_NOT_SUPPORTED;
     
    135137    else if (uSign.au16[0] == IMAGE_DOS_SIGNATURE)
    136138#ifdef LDR_WITH_MZ
    137         rc = rtldrMZOpen(pReader, phMod);
     139        rc = rtldrMZOpen(pReader, fFlags, enmArch, phMod);
    138140#else
    139141        rc = VERR_MZ_EXE_NOT_SUPPORTED;
     
    143145             0)
    144146#ifdef LDR_WITH_AOUT
    145         rc = rtldrAOUTOpen(pReader, phMod);
     147        rc = rtldrAOUTOpen(pReader, fFlags, enmArch, phMod);
    146148#else
    147149        rc = VERR_AOUT_EXE_NOT_SUPPORTED;
     
    158160    /* Try kLdr if it's a format we don't recognize. */
    159161    if (rc <= VERR_INVALID_EXE_SIGNATURE && rc > VERR_BAD_EXE_FORMAT)
    160         rc = rtldrkLdrOpen(pReader, phMod);
     162        rc = rtldrkLdrOpen(pReader, fFlags, enmArch, phMod);
    161163#endif
    162164
  • trunk/src/VBox/Runtime/common/ldr/ldrFile.cpp

    r8245 r16933  
    241241
    242242/**
    243  * Open a binary image file.
     243 * Open a binary image file, extended version.
    244244 *
    245245 * @returns iprt status code.
    246246 * @param   pszFilename Image filename.
    247  * @param   phLdrMod    Where to store the handle to the loaded module.
    248  */
    249 RTDECL(int) RTLdrOpen(const char *pszFilename, PRTLDRMOD phLdrMod)
    250 {
    251     LogFlow(("RTLdrOpen: pszFilename=%p:{%s} phLdrMod=%p\n",
    252              pszFilename, pszFilename, phLdrMod));
     247 * @param   fFlags      Reserved, MBZ.
     248 * @param   enmArch     CPU architecture specifier for the image to be loaded.
     249 * @param   phLdrMod    Where to store the handle to the loader module.
     250 */
     251RTDECL(int) RTLdrOpen(const char *pszFilename, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod)
     252{
     253    LogFlow(("RTLdrOpen: pszFilename=%p:{%s} fFlags=%#x enmArch=%d phLdrMod=%p\n",
     254             pszFilename, pszFilename, fFlags, enmArch, phLdrMod));
     255    AssertMsgReturn(!fFlags, ("%#x\n", fFlags), VERR_INVALID_PARAMETER);
     256    AssertMsgReturn(enmArch > RTLDRARCH_INVALID && enmArch < RTLDRARCH_END, ("%d\n", enmArch), VERR_INVALID_PARAMETER);
     257
     258    /*
     259     * Resolve RTLDRARCH_HOST.
     260     */
     261    if (enmArch == RTLDRARCH_HOST)
     262#if   defined(RT_ARCH_AMD64)
     263        enmArch = RTLDRARCH_AMD64;
     264#elif defined(RT_ARCH_X86)
     265        enmArch = RTLDRARCH_X86_32;
     266#else
     267        enmArch = RTLDRARCH_WHATEVER;
     268#endif
    253269
    254270    /*
     
    259275    if (RT_SUCCESS(rc))
    260276    {
    261         rc = rtldrOpenWithReader(pReader, phLdrMod);
     277        rc = rtldrOpenWithReader(pReader, fFlags, enmArch, phLdrMod);
    262278        if (RT_SUCCESS(rc))
    263279        {
     
    277293 *
    278294 * @returns iprt status code.
    279  * @param   pszFilename     Image filename.
    280  * @param   phLdrMod        Where to store the handle to the loaded module.
     295 * @param   pszFilename Image filename.
     296 * @param   fFlags      Reserved, MBZ.
     297 * @param   enmArch     CPU architecture specifier for the image to be loaded.
     298 * @param   phLdrMod    Where to store the handle to the loaded module.
    281299 * @remark  Primarily for testing the loader.
    282300 */
    283 RTDECL(int) RTLdrOpenkLdr(const char *pszFilename, PRTLDRMOD phLdrMod)
     301RTDECL(int) RTLdrOpenkLdr(const char *pszFilename, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod)
    284302{
    285303#ifdef LDR_WITH_KLDR
    286     LogFlow(("RTLdrOpenkLdr: pszFilename=%p:{%s} phLdrMod=%p\n",
    287              pszFilename, pszFilename, phLdrMod));
     304    LogFlow(("RTLdrOpenkLdr: pszFilename=%p:{%s} fFlags=%#x enmArch=%d phLdrMod=%p\n",
     305             pszFilename, pszFilename, fFlags, enmArch, phLdrMod));
     306
     307    /*
     308     * Resolve RTLDRARCH_HOST.
     309     */
     310    if (enmArch == RTLDRARCH_HOST)
     311# if   defined(RT_ARCH_AMD64)
     312        enmArch = RTLDRARCH_AMD64;
     313# elif defined(RT_ARCH_X86)
     314        enmArch = RTLDRARCH_X86_32;
     315# else
     316        enmArch = RTLDRARCH_WHATEVER;
     317# endif
    288318
    289319    /*
     
    294324    if (RT_SUCCESS(rc))
    295325    {
    296         rc = rtldrkLdrOpen(pReader, phLdrMod);
     326        rc = rtldrkLdrOpen(pReader, fFlags, enmArch, phLdrMod);
    297327        if (RT_SUCCESS(rc))
    298328        {
     
    307337
    308338#else
    309     return RTLdrOpen(pszFilename, phLdrMod);
     339    return RTLdrOpen(pszFilename, fFlags, enmArch, phLdrMod);
    310340#endif
    311341}
  • trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp

    r13837 r16933  
    944944 * @param   pFileHdr    Pointer to the file header that needs validating.
    945945 * @param   pszLogName  The log name to  prefix the errors with.
    946  */
    947 int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, const char *pszLogName)
     946 * @param   penmArch    Where to store the CPU architecture.
     947 */
     948int rtldrPEValidateFileHeader(PIMAGE_FILE_HEADER pFileHdr, const char *pszLogName, PRTLDRARCH penmArch)
    948949{
    949950    size_t cbOptionalHeader;
     
    952953        case IMAGE_FILE_MACHINE_I386:
    953954            cbOptionalHeader = sizeof(IMAGE_OPTIONAL_HEADER32);
     955            *penmArch = RTLDRARCH_X86_32;
    954956            break;
    955957        case IMAGE_FILE_MACHINE_AMD64:
    956958            cbOptionalHeader = sizeof(IMAGE_OPTIONAL_HEADER64);
     959            *penmArch = RTLDRARCH_AMD64;
    957960            break;
    958961
     
    960963            Log(("rtldrPEOpen: %s: Unsupported Machine=%#x\n",
    961964                 pszLogName, pFileHdr->Machine));
     965            *penmArch = RTLDRARCH_INVALID;
    962966            return VERR_BAD_EXE_FORMAT;
    963967    }
     
    14171421 * @returns iprt status code.
    14181422 * @param   pReader     The loader reader instance which will provide the raw image bits.
     1423 * @param   fFlags      Reserved, MBZ.
     1424 * @param   enmArch     Architecture specifier.
    14191425 * @param   offNtHdrs   The offset of the NT headers (where you find "PE\0\0").
    14201426 * @param   phLdrMod    Where to store the handle.
    14211427 */
    1422 int rtldrPEOpen(PRTLDRREADER pReader, RTFOFF offNtHdrs, PRTLDRMOD phLdrMod)
     1428int rtldrPEOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, RTFOFF offNtHdrs, PRTLDRMOD phLdrMod)
    14231429{
    14241430    /*
     
    14291435    if (RT_FAILURE(rc))
    14301436        return rc;
     1437    RTLDRARCH enmArchImage;
    14311438    const char *pszLogName = pReader->pfnLogName(pReader);
    1432     rc = rtldrPEValidateFileHeader(&FileHdr, pszLogName);
     1439    rc = rtldrPEValidateFileHeader(&FileHdr, pszLogName, &enmArchImage);
    14331440    if (RT_FAILURE(rc))
    14341441        return rc;
     1442
     1443    /*
     1444     * Match the CPU architecture.
     1445     */
     1446    if (    enmArch != RTLDRARCH_WHATEVER
     1447        &&  enmArch != enmArchImage)
     1448        return VERR_LDR_ARCH_MISMATCH;
    14351449
    14361450    /*
  • trunk/src/VBox/Runtime/common/ldr/ldrkStuff.cpp

    r16439 r16933  
    636636 * @returns iprt status code.
    637637 * @param   pReader     The loader reader instance which will provide the raw image bits.
     638 * @param   fFlags      Reserved, MBZ.
     639 * @param   enmArch     CPU architecture specifier for the image to be loaded.
    638640 * @param   phLdrMod    Where to store the handle.
    639641 */
    640 int rtldrkLdrOpen(PRTLDRREADER pReader, PRTLDRMOD phLdrMod)
    641 {
     642int rtldrkLdrOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod)
     643{
     644    /* Convert enmArch to k-speak. */
     645    KCPUARCH enmCpuArch;
     646    switch (enmArch)
     647    {
     648        case RTLDRARCH_WHATEVER:
     649            enmCpuArch = KCPUARCH_UNKNOWN;
     650            break;
     651        case RTLDRARCH_X86_32:
     652            enmCpuArch = KCPUARCH_X86_32;
     653            break;
     654        case RTLDRARCH_AMD64:
     655            enmCpuArch = KCPUARCH_AMD64;
     656            break;
     657        default:
     658            return VERR_INVALID_PARAMETER;
     659    }
     660
    642661    /* Create a rtkldrRdr instance. */
    643662    PRTKLDRRDR pRdr = (PRTKLDRRDR)RTMemAllocZ(sizeof(*pRdr));
  • trunk/src/VBox/Runtime/include/internal/ldr.h

    r8245 r16933  
    344344}
    345345
    346 int rtldrOpenWithReader(PRTLDRREADER pReader, PRTLDRMOD phMod);
     346int rtldrOpenWithReader(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phMod);
    347347
    348348
     
    372372int rtldrNativeLoad(const char *pszFilename, uintptr_t *phHandle);
    373373
    374 int rtldrPEOpen(PRTLDRREADER pReader, RTFOFF offNtHdrs, PRTLDRMOD phLdrMod);
    375 int rtldrELFOpen(PRTLDRREADER pReader, PRTLDRMOD phLdrMod);
    376 int rtldrkLdrOpen(PRTLDRREADER pReader, PRTLDRMOD phLdrMod);
    377 /*int rtldrLXOpen(PRTLDRREADER pReader, RTFOFF offLX, PRTLDRMOD phLdrMod);
    378 int rtldrMachoOpen(PRTLDRREADER pReader, RTFOFF offSomething, PRTLDRMOD phLdrMod);*/
     374int rtldrPEOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, RTFOFF offNtHdrs, PRTLDRMOD phLdrMod);
     375int rtldrELFOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod);
     376int rtldrkLdrOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, PRTLDRMOD phLdrMod);
     377/*int rtldrLXOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, RTFOFF offLX, PRTLDRMOD phLdrMod);
     378int rtldrMachoOpen(PRTLDRREADER pReader, uint32_t fFlags, RTLDRARCH enmArch, RTFOFF offSomething, PRTLDRMOD phLdrMod);*/
    379379
    380380
  • trunk/src/VBox/Runtime/testcase/tstLdr-2.cpp

    r14831 r16933  
    9696{
    9797    RTLDRMOD hLdrMod;
    98     int rc = RTLdrOpen(pszFilename, &hLdrMod);
     98    int rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_WHATEVER, &hLdrMod);
    9999    if (RT_FAILURE(rc))
    100100    {
  • trunk/src/VBox/Runtime/testcase/tstLdr-3.cpp

    r16436 r16933  
    184184    RTUINTPTR LoadAddr = (RTUINTPTR)RTStrToUInt64(argv[1]);
    185185    RTLDRMOD hLdrMod;
    186     int rc = RTLdrOpen(argv[2], &hLdrMod);
     186    int rc = RTLdrOpen(argv[2], 0, RTLDRARCH_WHATEVER, &hLdrMod);
    187187    if (RT_FAILURE(rc))
    188188    {
  • trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp

    r16435 r16933  
    122122    {
    123123        if (!strncmp(aLoads[i].pszName, "kLdr-", sizeof("kLdr-") - 1))
    124             rc = RTLdrOpenkLdr(pszFilename, &aLoads[i].hLdrMod);
     124            rc = RTLdrOpenkLdr(pszFilename, 0, RTLDRARCH_WHATEVER, &aLoads[i].hLdrMod);
    125125        else
    126             rc = RTLdrOpen(pszFilename, &aLoads[i].hLdrMod);
     126            rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_WHATEVER, &aLoads[i].hLdrMod);
    127127        if (RT_FAILURE(rc))
    128128        {
  • trunk/src/VBox/Runtime/testcase/tstLdr.cpp

    r16437 r16933  
    127127        int rc;
    128128        if (!strncmp(aLoads[i].pszName, "kLdr-", sizeof("kLdr-") - 1))
    129             rc = RTLdrOpenkLdr(pszFilename, &aLoads[i].hLdrMod);
     129            rc = RTLdrOpenkLdr(pszFilename, 0, RTLDRARCH_WHATEVER, &aLoads[i].hLdrMod);
    130130        else
    131             rc = RTLdrOpen(pszFilename, &aLoads[i].hLdrMod);
     131            rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_WHATEVER, &aLoads[i].hLdrMod);
    132132        if (RT_FAILURE(rc))
    133133        {
  • trunk/src/VBox/VMM/PDMLdr.cpp

    r14595 r16933  
    454454    int rc = SUPR3HardenedVerifyFile(pszFilename, "PDMR3LdrLoadRC", NULL);
    455455    if (RT_SUCCESS(rc))
    456         rc = RTLdrOpen(pszFilename, &pModule->hLdrMod);
     456        rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_X86_32, &pModule->hLdrMod);
    457457    if (RT_SUCCESS(rc))
    458458    {
  • trunk/src/recompiler/VBoxREMWrapper.cpp

    r15520 r16933  
    18411841     */
    18421842    strcpy(&szPath[offFilename], "/VBoxREM2.rel");
    1843     rc = RTLdrOpen(szPath, &g_ModREM2);
     1843    rc = RTLdrOpen(szPath, 0, RTLDRARCH_HOST, &g_ModREM2);
    18441844    if (RT_SUCCESS(rc))
    18451845    {
  • trunk/src/recompiler_new/VBoxREMWrapper.cpp

    r15764 r16933  
    18641864     */
    18651865    strcpy(&szPath[offFilename], "/VBoxREM2.rel");
    1866     rc = RTLdrOpen(szPath, &g_ModREM2);
     1866    rc = RTLdrOpen(szPath, 0, RTLDRARCH_HOST, &g_ModREM2);
    18671867    if (RT_SUCCESS(rc))
    18681868    {
Note: See TracChangeset for help on using the changeset viewer.

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