VirtualBox

Ignore:
Timestamp:
Oct 6, 2018 6:31:59 PM (6 years ago)
Author:
vboxsync
Message:

IPRT: Initial adaption of the kstuff loader code. bugref:9232

File:
1 edited

Legend:

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

    r73759 r74638  
    4242#include <iprt/string.h>
    4343#include <iprt/formats/mz.h>
     44#include <iprt/formats/mach-o.h>
    4445#include "internal/ldr.h"
    4546
     
    8182        &&  uSign.u32     != IMAGE_NT_SIGNATURE
    8283        &&  uSign.u32     != IMAGE_ELF_SIGNATURE
    83         &&  uSign.au16[0] != IMAGE_LX_SIGNATURE)
     84        &&  uSign.au16[0] != IMAGE_LX_SIGNATURE
     85        &&  uSign.u32     != IMAGE_MACHO64_SIGNATURE
     86        &&  uSign.u32     != IMAGE_MACHO64_SIGNATURE_OE
     87        &&  uSign.u32     != IMAGE_MACHO32_SIGNATURE
     88        &&  uSign.u32     != IMAGE_MACHO32_SIGNATURE_OE
     89        &&  uSign.u32     != IMAGE_FAT_SIGNATURE
     90        &&  uSign.u32     != IMAGE_FAT_SIGNATURE_OE )
    8491    {
    8592        Log(("rtldrOpenWithReader: %s: unknown magic %#x / '%.4s\n", pReader->pfnLogName(pReader), uSign.u32, &uSign.ach[0]));
     
    127134        rc = VERR_ELF_EXE_NOT_SUPPORTED;
    128135#endif
     136    else if (   uSign.u32 == IMAGE_MACHO64_SIGNATURE
     137             || uSign.u32 == IMAGE_MACHO64_SIGNATURE_OE
     138             || uSign.u32 == IMAGE_MACHO32_SIGNATURE
     139             || uSign.u32 == IMAGE_MACHO32_SIGNATURE_OE)
     140#if defined(LDR_WITH_MACHO)
     141        rc = rtldrMachOOpen(pReader, fFlags, enmArch, offHdr, phMod, pErrInfo);
     142#else
     143        rc = VERR_INVALID_EXE_SIGNATURE;
     144#endif
     145    else if (   uSign.u32 == IMAGE_FAT_SIGNATURE
     146             || uSign.u32 == IMAGE_FAT_SIGNATURE_OE)
     147#if defined(LDR_WITH_MACHO)
     148        rc = rtldrFatOpen(pReader, fFlags, enmArch, phMod, pErrInfo);
     149#else
     150        rc = VERR_INVALID_EXE_SIGNATURE;
     151#endif
    129152    else if (uSign.au16[0] == IMAGE_LX_SIGNATURE)
    130153#ifdef LDR_WITH_LX
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