Changeset 41050 in vbox for trunk/src/VBox/Runtime/r0drv/darwin
- Timestamp:
- Apr 25, 2012 10:10:16 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77614
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/dbgkrnlinfo-r0drv-darwin.cpp
r40856 r41050 590 590 const char *pszSym = &pThis->pachStrTab[(uint32_t)pSym->n_un.n_strx]; 591 591 #ifdef IN_RING3 592 RTAssertMsg2("%05i: %02x:%08 x %02x %04x %s\n", iSym, pSym->n_sect,pSym->n_value, pSym->n_type, pSym->n_desc, pszSym);592 RTAssertMsg2("%05i: %02x:%08llx %02x %04x %s\n", iSym, pSym->n_sect, (uint64_t)pSym->n_value, pSym->n_type, pSym->n_desc, pszSym); 593 593 #endif 594 594 … … 607 607 if (pSym->n_desc & ~(REFERENCED_DYNAMICALLY)) 608 608 RETURN_VERR_BAD_EXE_FORMAT; 609 if (pSym->n_value < pThis->apSections[pSym->n_sect - 1]->addr) 609 if ( pSym->n_value < pThis->apSections[pSym->n_sect - 1]->addr 610 && strcmp(pszSym, "__mh_execute_header")) /* in 10.8 it's no longer absolute (PIE?). */ 610 611 RETURN_VERR_BAD_EXE_FORMAT; 611 if ( pSym->n_value - pThis->apSections[pSym->n_sect - 1]->addr 612 > pThis->apSections[pSym->n_sect - 1]->size) 612 if ( pSym->n_value - pThis->apSections[pSym->n_sect - 1]->addr 613 > pThis->apSections[pSym->n_sect - 1]->size 614 && strcmp(pszSym, "__mh_execute_header")) /* see above. */ 613 615 RETURN_VERR_BAD_EXE_FORMAT; 614 616 break; 615 617 616 618 case MACHO_N_ABS: 617 #if 0 /* Spec say MACHO_NO_SECT, __mh_execute_header has 1 with 10.7/amd64 */ 618 if (pSym->n_sect != MACHO_NO_SECT) 619 #else 620 if (pSym->n_sect > pThis->cSections) 621 #endif 619 if ( pSym->n_sect != MACHO_NO_SECT 620 && ( strcmp(pszSym, "__mh_execute_header") /* n_sect=1 in 10.7/amd64 */ 621 || pSym->n_sect > pThis->cSections) ) 622 622 RETURN_VERR_BAD_EXE_FORMAT; 623 623 if (pSym->n_desc & ~(REFERENCED_DYNAMICALLY)) … … 828 828 case LC_DYSYMTAB: 829 829 case LC_UNIXTHREAD: 830 case LC_CODE_SIGNATURE: 831 case LC_VERSION_MIN_MACOSX: 832 case LC_FUNCTION_STARTS: 833 case LC_MAIN: 834 case LC_DATA_IN_CODE: 835 case LC_SOURCE_VERSION: 830 836 break; 831 837 … … 847 853 case LC_TWOLEVEL_HINTS: 848 854 case LC_PREBIND_CKSUM: 855 case LC_SEGMENT_SPLIT_INFO: 856 case LC_ENCRYPTION_INFO: 857 RETURN_VERR_LDR_UNEXPECTED; 858 859 /* no phones here yet */ 860 case LC_VERSION_MIN_IPHONEOS: 849 861 RETURN_VERR_LDR_UNEXPECTED; 850 862 … … 860 872 case LC_SUB_CLIENT: 861 873 case LC_SUB_LIBRARY: 874 case LC_RPATH: 875 case LC_REEXPORT_DYLIB: 876 case LC_LAZY_LOAD_DYLIB: 877 case LC_DYLD_INFO: 878 case LC_DYLD_INFO_ONLY: 879 case LC_LOAD_UPWARD_DYLIB: 880 case LC_DYLD_ENVIRONMENT: 881 case LC_DYLIB_CODE_SIGN_DRS: 862 882 RETURN_VERR_LDR_UNEXPECTED; 863 883
Note:
See TracChangeset
for help on using the changeset viewer.