1*1b191cb5SApple OSS Distributions // 2*1b191cb5SApple OSS Distributions // _libc_weak_funcptr.c 3*1b191cb5SApple OSS Distributions // Libsyscall_static 4*1b191cb5SApple OSS Distributions // 5*1b191cb5SApple OSS Distributions // Created by Ian Fang on 11/30/21. 6*1b191cb5SApple OSS Distributions // 7*1b191cb5SApple OSS Distributions // dyld needs the following definitions to link against Libsyscall_static. 8*1b191cb5SApple OSS Distributions // When building Libsyscall_dynamic, the weak symbols below will get overridden 9*1b191cb5SApple OSS Distributions // by actual implementation. 10*1b191cb5SApple OSS Distributions // 11*1b191cb5SApple OSS Distributions 12*1b191cb5SApple OSS Distributions #include "_libkernel_init.h" 13*1b191cb5SApple OSS Distributions 14*1b191cb5SApple OSS Distributions __attribute__((weak, visibility("hidden"))) 15*1b191cb5SApple OSS Distributions void * malloc(__unused size_t size)16*1b191cb5SApple OSS Distributionsmalloc(__unused size_t size) 17*1b191cb5SApple OSS Distributions { 18*1b191cb5SApple OSS Distributions return NULL; 19*1b191cb5SApple OSS Distributions } 20*1b191cb5SApple OSS Distributions 21*1b191cb5SApple OSS Distributions __attribute__((weak, visibility("hidden"))) 22*1b191cb5SApple OSS Distributions mach_msg_size_t voucher_mach_msg_fill_aux(__unused mach_msg_aux_header_t * aux_hdr,__unused mach_msg_size_t sz)23*1b191cb5SApple OSS Distributionsvoucher_mach_msg_fill_aux(__unused mach_msg_aux_header_t *aux_hdr, 24*1b191cb5SApple OSS Distributions __unused mach_msg_size_t sz) 25*1b191cb5SApple OSS Distributions { 26*1b191cb5SApple OSS Distributions return 0; 27*1b191cb5SApple OSS Distributions } 28*1b191cb5SApple OSS Distributions 29*1b191cb5SApple OSS Distributions __attribute__((weak, visibility("hidden"))) 30*1b191cb5SApple OSS Distributions boolean_t voucher_mach_msg_fill_aux_supported(void)31*1b191cb5SApple OSS Distributionsvoucher_mach_msg_fill_aux_supported(void) 32*1b191cb5SApple OSS Distributions { 33*1b191cb5SApple OSS Distributions return FALSE; 34*1b191cb5SApple OSS Distributions } 35