VirtualBox

Changeset 917 in vbox


Ignore:
Timestamp:
Feb 15, 2007 1:55:55 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18645
Message:

Allow mixing of platform code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp

    r915 r917  
    4949static DECLCALLBACK(int) testGetImport(RTLDRMOD hLdrMod, const char *pszModule, const char *pszSymbol, unsigned uSymbol, RTUINTPTR *pValue, void *pvUser)
    5050{
    51     if (!strcmp(pszSymbol, "AssertMsg1"))
     51    if (     !strcmp(pszSymbol, "AssertMsg1")           || !strcmp(pszSymbol, "_AssertMsg1"))
    5252        *pValue = (uintptr_t)AssertMsg1;
    53     else if (!strcmp(pszSymbol, "AssertMsg2"))
     53    else if (!strcmp(pszSymbol, "AssertMsg2")           || !strcmp(pszSymbol, "_AssertMsg2"))
    5454        *pValue = (uintptr_t)AssertMsg2;
    55     else if (!strcmp(pszSymbol, "RTLogDefaultInstance"))
     55    else if (!strcmp(pszSymbol, "RTLogDefaultInstance") || !strcmp(pszSymbol, "_RTLogDefaultInstance"))
    5656        *pValue = (uintptr_t)RTLogDefaultInstance;
    57     else if (!strcmp(pszSymbol, "MyPrintf"))
     57    else if (!strcmp(pszSymbol, "MyPrintf")             || !strcmp(pszSymbol, "_MyPrintf"))
    5858        *pValue = (uintptr_t)RTPrintf;
    5959    else
     
    154154            RTUINTPTR Value;
    155155            rc = RTLdrGetSymbolEx(aLoads[i].hLdrMod, aLoads[i].pvBits, (uintptr_t)aLoads[i].pvBits, "DisasmTest1", &Value);
     156            if (rc == VERR_SYMBOL_NOT_FOUND)
     157                rc = RTLdrGetSymbolEx(aLoads[i].hLdrMod, aLoads[i].pvBits, (uintptr_t)aLoads[i].pvBits, "_DisasmTest1", &Value);
    156158            if (RT_FAILURE(rc))
    157159            {
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