attribute((constructor))这个特殊语法通常用于标记在程序执行main函数之前需要执行的初始化函数,是GNU C/C++的特色,不一定在其他编译器中得到支持
_attribute((constructor))void before()
{
printf("before main\n");
}
attribute((constructor))这个特殊语法通常用于标记在程序执行main函数之前需要执行的初始化函数,是GNU C/C++的特色,不一定在其他编译器中得到支持
_attribute((constructor))void before()
{
printf("before main\n");
}