Changeset 25 for trunk/include


Ignore:
Timestamp:
Feb 19, 2009, 1:56:15 AM (17 years ago)
Author:
bird
Message:

A blind shot at FAT Mach-O images.

Location:
trunk/include/k
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/k/kErrors.h

    r21 r25  
    196196/** Not implemented yet. */
    197197#define KLDR_ERR_TODO                                   (KLDR_ERR_BASE + 34)
     198/** No image matching the requested CPU. */
     199#define KLDR_ERR_CPU_ARCH_MISMATCH                      (KLDR_ERR_BASE + 35)
     200/** Invalid FAT image header. */
     201#define KLDR_ERR_FAT_INVALID                            (KLDR_ERR_BASE + 36)
     202/** Unsupported CPU subtype found in a FAT entry. */
     203#define KLDR_ERR_FAT_UNSUPPORTED_CPU_SUBTYPE            (KLDR_ERR_BASE + 37)
    198204/** @} */
    199205
     
    202208 */
    203209/** The base of the kLdrModPE specific status codes. */
    204 #define KLDR_ERR_PE_BASE                                (KLDR_ERR_BASE + 35)
     210#define KLDR_ERR_PE_BASE                                (KLDR_ERR_BASE + 38)
    205211/** The machine isn't supported by the interpreter. */
    206212#define KLDR_ERR_PE_UNSUPPORTED_MACHINE                 (KLDR_ERR_PE_BASE + 0)
  • trunk/include/k/kLdr.h

    r19 r25  
    582582
    583583
    584 int     kLdrModOpen(const char *pszFilename, PPKLDRMOD ppMod);
    585 int     kLdrModOpenFromRdr(PKRDR pRdr, PPKLDRMOD ppMod);
     584int     kLdrModOpen(const char *pszFilename, KU32 fFlags, KCPUARCH enmCpuArch, PPKLDRMOD ppMod);
     585int     kLdrModOpenFromRdr(PKRDR pRdr, KU32 fFlags, KCPUARCH enmCpuArch, PPKLDRMOD ppMod);
    586586int     kLdrModOpenNative(const char *pszFilename, PPKLDRMOD ppMod);
    587587int     kLdrModOpenNativeByHandle(KUPTR uHandle, PPKLDRMOD ppMod);
     
    647647     * @param   pOps            Pointer to the registered method table.
    648648     * @param   pRdr            The file provider instance to use.
     649     * @param   fFlags          Flags, MBZ.
     650     * @param   enmCpuArch      The desired CPU architecture. KCPUARCH_UNKNOWN means
     651     *                          anything goes, but with a preference for the current
     652     *                          host architecture.
    649653     * @param   offNewHdr       The offset of the new header in MZ files. -1 if not found.
    650654     * @param   ppMod           Where to store the module instance pointer.
    651655     */
    652     int (* pfnCreate)(PCKLDRMODOPS pOps, PKRDR pRdr, KLDRFOFF offNewHdr, PPKLDRMOD ppMod);
     656    int (* pfnCreate)(PCKLDRMODOPS pOps, PKRDR pRdr, KU32 fFlags, KCPUARCH enmCpuArch, KLDRFOFF offNewHdr, PPKLDRMOD ppMod);
    653657    /**
    654658     * Destroys an loader module instance.
Note: See TracChangeset for help on using the changeset viewer.