VirtualBox

Changeset 75053 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Oct 24, 2018 7:08:56 PM (6 years ago)
Author:
vboxsync
Message:

IPRT,SUPDrv: Made the verification code link, fixed a couple of assertions. Seems to work for VMMR0 now. bugref:9232

Location:
trunk/src/VBox/Runtime/common/ldr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/ldr/ldrEx.cpp

    r74654 r75053  
    4545#include "internal/ldr.h"
    4646
    47 #ifdef LDR_ONLY_PE
     47#if defined(LDR_ONLY_PE) || defined(LDR_ONLY_MACHO)
    4848# undef LDR_WITH_PE
    4949# undef LDR_WITH_ELF
     
    5454# undef LDR_WITH_MZ
    5555# undef LDR_WITH_AOUT
    56 # define LDR_WITH_PE
     56# ifdef LDR_ONLY_PE
     57#  define LDR_WITH_PE
     58# endif
     59# ifdef LDR_ONLY_MACHO
     60#  define LDR_WITH_MACHO
     61# endif
    5762#endif
    5863
  • trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp

    r74857 r75053  
    782782                    case S_MOD_INIT_FUNC_POINTERS: \
    783783                        /** @todo this requires a query API or flag... (e.g. C++ constructors) */ \
    784                         RTLDRMODMACHO_CHECK_RETURN(fOpenFlags & RTLDR_O_FOR_DEBUG, \
     784                        RTLDRMODMACHO_CHECK_RETURN(fOpenFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION), \
    785785                                                  VERR_LDRMACHO_UNSUPPORTED_INIT_SECTION); \
    786786                        RT_FALL_THRU(); \
    787787                    case S_MOD_TERM_FUNC_POINTERS: \
    788788                        /** @todo this requires a query API or flag... (e.g. C++ destructors) */ \
    789                         RTLDRMODMACHO_CHECK_RETURN(fOpenFlags & RTLDR_O_FOR_DEBUG, \
     789                        RTLDRMODMACHO_CHECK_RETURN(fOpenFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION), \
    790790                                                  VERR_LDRMACHO_UNSUPPORTED_TERM_SECTION); \
    791791                        RTLDRMODMACHO_CHECK_RETURN(!pSect->reserved1, VERR_LDRMACHO_BAD_SECTION); \
     
    11991199            case LC_MAIN: /** @todo parse this and find and entry point or smth. */
    12001200                /** @todo valid command size. */
    1201                 if (!(fOpenFlags & RTLDR_O_FOR_DEBUG))
     1201                if (!(fOpenFlags & (RTLDR_O_FOR_DEBUG | RTLDR_O_FOR_VALIDATION)))
    12021202                    RTLDRMODMACHO_FAILED_RETURN(RTErrInfoSetF(pErrInfo, VERR_LDRMACHO_UNSUPPORTED_LOAD_COMMAND,
    12031203                                                             "cmd=%#x", u.pLoadCmd->cmd));
  • trunk/src/VBox/Runtime/common/ldr/ldrMemory.cpp

    r75049 r75053  
    278278        pfnDtor = rtldrRdrMemDefaultDtor;
    279279    else
    280         AssertPtrReturn(pfnRead, VERR_INVALID_POINTER);
     280        AssertPtrReturn(pfnDtor, VERR_INVALID_POINTER);
    281281
    282282    /* The rest of the validations will call the destructor. */
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