Changeset 37562 in vbox for trunk/src/VBox
- Timestamp:
- Jun 20, 2011 4:54:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/mach_kernel-r0drv-darwin.cpp
r37561 r37562 211 211 if (pSym->n_type & MACHO_N_STAB) 212 212 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) 216 217 return pSym->n_value; 217 218 } … … 224 225 225 226 227 extern "C" void OSRuntimeFinalizeCPP(void); 228 extern "C" void OSRuntimeInitializeCPP(void); 229 226 230 static int rtR0DarwinMachKernelCheckStandardSymbols(PRTR0DARWINKERNEL pKernel) 227 231 { … … 232 236 } const s_aStandardCandles[] = 233 237 { 234 #if 0/// @tododef IN_RING0238 #ifdef IN_RING0 235 239 # define KNOWN_ENTRY(a_Sym) { #a_Sym, (uintptr_t)&a_Sym } 236 240 #else 237 241 # define KNOWN_ENTRY(a_Sym) { #a_Sym, 0 } 238 242 #endif 239 KNOWN_ENTRY(IOM Alloc),243 KNOWN_ENTRY(IOMalloc), 240 244 KNOWN_ENTRY(IOFree), 241 245 KNOWN_ENTRY(OSRuntimeFinalizeCPP), … … 322 326 if (pSym->n_sect > pKernel->cSections) 323 327 RETURN_VERR_BAD_EXE_FORMAT; 324 if (pSym->n_desc != 0)328 if (pSym->n_desc & ~(REFERENCED_DYNAMICALLY)) 325 329 RETURN_VERR_BAD_EXE_FORMAT; 326 330 if (pSym->n_value < pKernel->apSections[pSym->n_sect - 1]->addr) … … 332 336 333 337 case MACHO_N_ABS: 338 #if 0 /* Spec say MACHO_NO_SECT, __mh_execute_header has 1 with 10.7/amd64 */ 334 339 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)) 337 345 RETURN_VERR_BAD_EXE_FORMAT; 338 346 break;
Note:
See TracChangeset
for help on using the changeset viewer.