Changeset 56
- Timestamp:
- Oct 11, 2013, 4:07:22 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/k/kLdrFmts/mach-o.h
r55 r56 370 370 #define LC_ROUTINES_64 KU32_C(0x1a) /**< Image routines (64-bit). See routines_command_32. */ 371 371 #define LC_UUID KU32_C(0x1b) /**< The UUID of the object module. See uuid_command. */ 372 #define LC_RPATH KU32_C(0x1c| LC_REQ_DYLD) /**< Runpth additions. See rpath_command. */372 #define LC_RPATH (KU32_C(0x1c) | LC_REQ_DYLD) /**< Runpth additions. See rpath_command. */ 373 373 #define LC_CODE_SIGNATURE KU32_C(0x1d) /**< Code signature location. See linkedit_data_command. */ 374 374 #define LC_SEGMENT_SPLIT_INFO KU32_C(0x1e)/**< Segment split info location. See linkedit_data_command. */ 375 #define LC_REEXPORT_DYLIB KU32_C(0x1f| LC_REQ_DYLD)/**< Load and re-export the given dylib - DLL forwarding. See dylib_command. */375 #define LC_REEXPORT_DYLIB (KU32_C(0x1f) | LC_REQ_DYLD)/**< Load and re-export the given dylib - DLL forwarding. See dylib_command. */ 376 376 #define LC_LAZY_LOAD_DYLIB KU32_C(0x20) /**< Delays loading of the given dylib until used. See dylib_command? */ 377 377 #define LC_ENCRYPTION_INFO KU32_C(0x21) /**< Segment encryption information. See encryption_info_command. */ 378 378 #define LC_DYLD_INFO KU32_C(0x22) /**< Compressed dylib relocation information, alternative present. See dyld_info_command. */ 379 #define LC_DYLD_INFO_ONLY KU32_C(0x22| LC_REQ_DYLD) /**< Compressed dylib relocation information, no alternative. See dyld_info_command. */379 #define LC_DYLD_INFO_ONLY (KU32_C(0x22) | LC_REQ_DYLD) /**< Compressed dylib relocation information, no alternative. See dyld_info_command. */ 380 380 #define LC_LOAD_UPWARD_DYLIB KU32_C(0x23) /**< ???? */ 381 381 #define LC_VERSION_MIN_MACOSX KU32_C(0x24) /**< The image requires the given Mac OS X version. See version_min_command. */ 382 382 #define LC_VERSION_MIN_IPHONEOS KU32_C(0x25) /**< The image requires the given iOS version. See version_min_command. */ 383 383 #define LC_FUNCTION_STARTS KU32_C(0x26) /**< Where to find the compress function start addresses. See linkedit_data_command. */ 384 #define LC_DYLD_ENVIRONMENT KU32_C(0x26) /**< Environment variable for the dynamic linker. See dylinker_command. */ 384 #define LC_DYLD_ENVIRONMENT KU32_C(0x27) /**< Environment variable for the dynamic linker. See dylinker_command. */ 385 #define LC_MAIN (KU32_C(0x28) | LC_REQ_DYLD) /**< Simpler alternative to LC_UNIXTHREAD. */ 386 #define LC_DATA_IN_CODE KU32_C(0x29) /**< Table of data in the the text section. */ 387 #define LC_SOURCE_VERSION KU32_C(0x2a) /**< Source code revision / version hint. */ 388 #define LC_DYLIB_CODE_SIGN_DRS KU32_C(0x2b) /**< Code signing designated requirements copied from dylibs prequisites. */ 385 389 /** @} */ 386 390 -
trunk/kLdr/kLdrModMachO.c
r55 r56 857 857 case S_SYMBOL_STUBS: 858 858 if ( pSect->reserved1 859 || pSect->reserved2 < 1 /* stub size.*/ 860 || pSect->reserved2 > 64 ) 859 || pSect->reserved2 > 64 /* stub size. 0 has been seen (corecrypto.kext) */ ) 861 860 return KLDR_ERR_MACHO_BAD_SECTION; 862 861 fFileBits = 1; … … 1055 1054 break; 1056 1055 1056 case LC_SOURCE_VERSION: /* Harmless. It just gives a clue regarding the source code revision/version. */ 1057 case LC_DATA_IN_CODE: /* Ignore */ 1058 case LC_DYLIB_CODE_SIGN_DRS:/* Ignore */ 1059 /** @todo valid command size. */ 1060 break; 1061 1062 case LC_ID_DYLIB: /** @todo dylib */ 1063 case LC_LOAD_DYLIB: /** @todo dylib */ 1064 case LC_LOAD_DYLINKER: /** @todo dylib */ 1065 case LC_TWOLEVEL_HINTS: /** @todo dylib */ 1066 case LC_LOAD_WEAK_DYLIB: /** @todo dylib */ 1067 case LC_ID_DYLINKER: /** @todo dylib */ 1068 case LC_DYLD_ENVIRONMENT: /** @todo dylib */ 1069 case LC_MAIN: /** @todo parse this and find and entry point or smth. */ 1070 /** @todo valid command size. */ 1071 if (!(fOpenFlags & KLDRMOD_OPEN_FLAGS_FOR_INFO)) 1072 return KLDR_ERR_MACHO_UNSUPPORTED_LOAD_COMMAND; 1073 break; 1074 1057 1075 case LC_LOADFVMLIB: 1058 1076 case LC_IDFVMLIB: … … 1060 1078 case LC_FVMFILE: 1061 1079 case LC_PREPAGE: 1062 case LC_LOAD_DYLIB:1063 case LC_ID_DYLIB:1064 case LC_LOAD_DYLINKER:1065 case LC_ID_DYLINKER:1066 1080 case LC_PREBOUND_DYLIB: 1067 1081 case LC_ROUTINES: … … 1071 1085 case LC_SUB_CLIENT: 1072 1086 case LC_SUB_LIBRARY: 1073 case LC_TWOLEVEL_HINTS:1074 1087 case LC_PREBIND_CKSUM: 1075 case LC_LOAD_WEAK_DYLIB:1076 1088 case LC_SYMSEG: 1077 1089 return KLDR_ERR_MACHO_UNSUPPORTED_LOAD_COMMAND;
Note:
See TracChangeset
for help on using the changeset viewer.