• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/dyld-353.2.1/src/

Lines Matching +defs:mh +defs:data

354     static mach_header_64* mh = NULL;
356 static mach_header* mh = NULL;
358 if ( mh == NULL )
359 mh = _NSGetMachExecuteHeader();
361 const load_command* lc = (load_command*)((char*)mh + sizeof(mach_header_64));
363 const load_command* lc = (load_command*)((char*)mh + sizeof(mach_header));
365 for(uint32_t i = 0; i < mh->ncmds; i++){
392 const mach_header* mh = _dyld_get_image_header(i);
393 if ( mh == NULL )
395 if ( mh->filetype != MH_DYLIB )
398 const load_command* lc = (load_command*)((char*)mh + sizeof(mach_header_64));
400 const load_command* lc = (load_command*)((char*)mh + sizeof(mach_header));
402 for(uint32_t j = 0; j < mh->ncmds; j++){
427 uint32_t dyld_get_sdk_version(const mach_header* mh)
430 if ( mh->magic == MH_MAGIC_64 )
431 startCmds = (load_command*)((char *)mh + sizeof(mach_header_64));
432 else if ( mh->magic == MH_MAGIC )
433 startCmds = (load_command*)((char *)mh + sizeof(mach_header));
437 const load_command* const cmdsEnd = (load_command*)((char*)startCmds + mh->sizeofcmds);
447 for(uint32_t i = 0; i < mh->ncmds; ++i) {
559 uint32_t dyld_get_min_os_version(const struct mach_header* mh)
562 if ( mh->magic == MH_MAGIC_64 )
563 startCmds = (load_command*)((char *)mh + sizeof(mach_header_64));
564 else if ( mh->magic == MH_MAGIC )
565 startCmds = (load_command*)((char *)mh + sizeof(mach_header));
569 const load_command* const cmdsEnd = (load_command*)((char*)startCmds + mh->sizeofcmds);
572 for(uint32_t i = 0; i < mh->ncmds; ++i) {
963 void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide))
966 typedef void (*callback_t)(const struct mach_header *mh, intptr_t vmaddr_slide);
981 void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide))
984 typedef void (*callback_t)(const struct mach_header *mh, intptr_t vmaddr_slide);
1137 intptr_t _dyld_get_image_slide(const struct mach_header* mh)
1144 return(p(mh));
1208 // data kept per-thread
1220 // create key and tell pthread package to call free() on any data associated with key if thread dies
1226 dlerrorPerThreadData* data = (dlerrorPerThreadData*)pthread_getspecific(dlerrorPerThreadKey);
1227 if ( data == NULL ) {
1230 data = (dlerrorPerThreadData*)malloc(mallocSize);
1231 data->sizeAllocated = size;
1232 pthread_setspecific(dlerrorPerThreadKey, data);
1234 else if ( data->sizeAllocated < sizeRequired ) {
1235 free(data);
1238 data = (dlerrorPerThreadData*)malloc(mallocSize);
1239 data->sizeAllocated = size;
1240 pthread_setspecific(dlerrorPerThreadKey, data);
1242 return data->message;
1473 void dyld_dynamic_interpose(const struct mach_header* mh, const struct dyld_interpose_tuple array[], size_t count)
1476 static void (*p)(const struct mach_header* mh, const struct dyld_interpose_tuple array[], size_t count) = NULL;
1480 p(mh, array, count);