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

void kldrDyldDoLoadExe ( PKLDRDYLDMOD  pExe  ) 

Worker kLdrDoLoadExe(). Used after we've switch to the final process stack.

Parameters:
pExe The executable module.

For internal use only.

Definition at line 571 of file kLdrDyld.c.

References g_cActiveLoadCalls, KLDRDYLD_LOAD_FLAGS_EXECUTABLE, kldrDyldDoLoad2(), kldrDyldDoModuleTerminationAndGarabageCollection(), kldrDyldFailure(), kLdrDyldFlags, kldrDyldModStartExe(), kLdrDyldSearch, NULL, KLDRDYLDMOD::pMod, and KLDRMOD::pszFilename.

Referenced by kldrDyldDoLoadExeStackSwitch().

{
    int rc;

    /*
     * Load the executable module with its prerequisites and initialize them.
     */
    g_cActiveLoadCalls++;
    rc = kldrDyldDoLoad2(pExe, NULL, NULL, kLdrDyldSearch, kLdrDyldFlags | KLDRDYLD_LOAD_FLAGS_EXECUTABLE);
    if (rc)
        kldrDyldFailure(rc, "load 2 failed for '%s', rc=%d", pExe->pMod->pszFilename);
    g_cActiveLoadCalls--;
    kldrDyldDoModuleTerminationAndGarabageCollection();

    /*
     * Invoke the executable entry point.
     */
    kldrDyldModStartExe(pExe);
    kldrDyldFailure(-1, "failed to invoke main!");
}


Generated by  Doxygen 1.6.0   Back to index