Closed tyfkda closed 4 days ago
__attribute__((constructor)) static void start_func(void) {} __attribute__((destructor)) static void end_func(void) {}
$ gcc -S -o- foo.c ... .section .init_array,"aw" .align 8 .quad start_func ... .section .fini_array,"aw" .align 8 .quad end_func ...