this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

TASK_DYLD_INFO support - mldr side (#304)

+17
+9
src/startup/elfcalls.c
··· 5 5 #include "threads.h" 6 6 7 7 extern uint8_t exe_uuid[16]; 8 + extern uintptr_t dyld_all_image_location; 9 + extern size_t dyld_all_image_size; 8 10 9 11 static void* dlopen_simple(const char* name) 10 12 { ··· 48 50 return exe_uuid; 49 51 } 50 52 53 + static void get_dyld_info(uintptr_t* all_image_location, size_t* all_image_length) 54 + { 55 + *all_image_location = dyld_all_image_location; 56 + *all_image_length = dyld_all_image_size; 57 + } 58 + 51 59 char* elfcalls_make(void) 52 60 { 53 61 static char param[32]; ··· 67 75 calls.darling_thread_get_stack = __darling_thread_get_stack; 68 76 69 77 calls.exe_uuid = get_exe_uuid; 78 + calls.dyld_info = get_dyld_info; 70 79 71 80 sprintf(param, "elf_calls=%p", &calls); 72 81 return param;
+2
src/startup/elfcalls.h
··· 27 27 // Get main executable's UUID (16 bytes) 28 28 const uint8_t* (*exe_uuid)(void); 29 29 30 + // Get data for TASK_DYLD_INFO (struct task_dyld_info) 31 + void (*dyld_info)(uintptr_t* all_image_location, __SIZE_TYPE__* all_image_length); 30 32 }; 31 33 32 34 #endif
+2
src/startup/loader.c
··· 154 154 { 155 155 if (strncmp(sect->sectname, "__all_image_info", 16) == 0) 156 156 { 157 + dyld_all_image_location = slide + sect->addr; 158 + dyld_all_image_size = sect->size; 157 159 #ifdef GEN_64BIT 158 160 setup_gdb_notifications(slide, sect->addr); 159 161 #endif
+4
src/startup/mldr.c
··· 73 73 // UUID of the main executable 74 74 uint8_t exe_uuid[16]; 75 75 76 + // Data for TASK_DYLD_INFO 77 + uintptr_t dyld_all_image_location; 78 + size_t dyld_all_image_size; 79 + 76 80 #if USE_32IN64 77 81 static void* setup_stack32(void* stack, int argc, const char** argv, const char** envp, const char** apple, uint64_t mh); 78 82