1 /* 2 * Copyright (C) 2015-2017 Alibaba Group Holding Limited 3 */ 4 5 #if defined(__GNUC__) 6 typedef void (*pfunc)(); 7 extern pfunc __ctors_start__[]; 8 extern pfunc __ctors_end__[]; 9 10 __attribute__((weak)) void *__dso_handle = 0; 11 cpp_init(void)12void cpp_init(void) 13 { 14 pfunc *f; 15 16 for (f = __ctors_start__; f < __ctors_end__; f++) { 17 (*f)(); 18 } 19 } 20 #endif 21