VirtualBox

Changeset 37562 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 20, 2011 4:54:53 PM (14 years ago)
Author:
vboxsync
Message:

fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/darwin/mach_kernel-r0drv-darwin.cpp

    r37561 r37562  
    211211        if (pSym->n_type & MACHO_N_STAB)
    212212            continue;
    213         const char *pszSym = &pKernel->pachStrTab[(uint32_t)pSym->n_un.n_strx];
    214         if (   *pszSym == '_'
    215             && strcmp(pszSym + 1, pszSymbol) == 0)
     213
     214        const char *pszTabName= &pKernel->pachStrTab[(uint32_t)pSym->n_un.n_strx];
     215        if (   *pszTabName == '_'
     216            && strcmp(pszTabName + 1, pszSymbol) == 0)
    216217            return pSym->n_value;
    217218    }
     
    224225
    225226
     227extern "C" void OSRuntimeFinalizeCPP(void);
     228extern "C" void OSRuntimeInitializeCPP(void);
     229
    226230static int rtR0DarwinMachKernelCheckStandardSymbols(PRTR0DARWINKERNEL pKernel)
    227231{
     
    232236    } const s_aStandardCandles[] =
    233237    {
    234 #if 0/// @todo def IN_RING0
     238#ifdef IN_RING0
    235239# define KNOWN_ENTRY(a_Sym)  { #a_Sym, (uintptr_t)&a_Sym }
    236240#else
    237241# define KNOWN_ENTRY(a_Sym)  { #a_Sym, 0 }
    238242#endif
    239         KNOWN_ENTRY(IOMAlloc),
     243        KNOWN_ENTRY(IOMalloc),
    240244        KNOWN_ENTRY(IOFree),
    241245        KNOWN_ENTRY(OSRuntimeFinalizeCPP),
     
    322326                    if (pSym->n_sect > pKernel->cSections)
    323327                        RETURN_VERR_BAD_EXE_FORMAT;
    324                     if (pSym->n_desc != 0)
     328                    if (pSym->n_desc & ~(REFERENCED_DYNAMICALLY))
    325329                        RETURN_VERR_BAD_EXE_FORMAT;
    326330                    if (pSym->n_value < pKernel->apSections[pSym->n_sect - 1]->addr)
     
    332336
    333337                case MACHO_N_ABS:
     338#if 0 /* Spec say MACHO_NO_SECT, __mh_execute_header has 1 with 10.7/amd64 */
    334339                    if (pSym->n_sect != MACHO_NO_SECT)
    335                         RETURN_VERR_BAD_EXE_FORMAT;
    336                     if (pSym->n_desc != 0)
     340#else
     341                    if (pSym->n_sect > pKernel->cSections)
     342#endif
     343                        RETURN_VERR_BAD_EXE_FORMAT;
     344                    if (pSym->n_desc & ~(REFERENCED_DYNAMICALLY))
    337345                        RETURN_VERR_BAD_EXE_FORMAT;
    338346                    break;
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