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

int kldrDyldModFixup ( PKLDRDYLDMOD  pMod  ) 

Applies fixups to a module which prerequisistes has been successfully loaded.

Returns:
0 on success, non-zero native OS or kLdr status code on failure.
Parameters:
pMod The module which needs to be unmapped and set pending for destruction.

Todo:
fixme.

Definition at line 1026 of file kLdrDyldMod.c.

References KLDRDYLDMOD::cRefs, KLDRDYLDMOD::enmState, KLDRDYLDMOD_ASSERT, kldrDyldModFixupGetImportCallback(), kLdrModFixupMapping(), KLDRSTATE_FIXED_UP, KLDRSTATE_LOADED_PREREQUISITES, KLDRSTATE_RELOADED_LOADED_PREREQUISITES, and KLDRDYLDMOD::pMod.

Referenced by kldrDyldDoLoad2().

{
    int rc;

    /* sanity */
    KLDRDYLDMOD_ASSERT(pMod->cRefs > 0);
    KLDRDYLDMOD_ASSERT(     pMod->enmState == KLDRSTATE_LOADED_PREREQUISITES
                       ||   pMod->enmState == KLDRSTATE_RELOADED_LOADED_PREREQUISITES);

    /* do the job */
    rc = kLdrModFixupMapping(pMod->pMod, kldrDyldModFixupGetImportCallback, pMod);/** @todo fixme. */
    if (!rc)
        pMod->enmState = KLDRSTATE_FIXED_UP;
    return rc;
}


Generated by  Doxygen 1.6.0   Back to index