/************************************************************************ map_images* Process the given images which are being mapped in by dyld.* Calls ABI-agnostic code after taking ABI-specific locks.** Locking: write-locks runtimeLock**********************************************************************/voidmap_images(unsigned count,constchar*const paths[],const struct mach_header *const mhdrs[]){mutex_locker_tlock(runtimeLock);returnmap_images_nolock(count, paths, mhdrs);}
2.1 map_images_nolock
voidmap_images_nolock(unsigned mhCount,constchar*const mhPaths[],const struct mach_header *const mhdrs[]){ ...if (hCount >0) {_read_images(hList, hCount, totalClasses, unoptimizedTotalClasses); } ... // Call image load funcs after everything is set up.for (auto func : loadImageFuncs) {for (uint32_t i =0; i < mhCount; i++) {func(mhdrs[i]); } }}