This commit is contained in:
huxi
2025-12-03 11:12:34 +08:00
parent c23ae4f24c
commit bc195654bf
8163 changed files with 3799544 additions and 92 deletions
+20
View File
@@ -0,0 +1,20 @@
#include "typedef.h"
//fixme
void abort(void)
{
printf("RTOS VIR_ABORT!\n");
}
void cpp_run_init(void)
{
typedef void (*pfunc)();
extern pfunc ctors_begin[];
extern pfunc ctors_end[];
pfunc *p;
// 调用全局构造函数(注意是要逆序)
for (p = ctors_end; p > ctors_begin;) {
(*--p)(); // 注意这里是倒序调用的
}
}