fix: remove useless c code (#1116)

* fix: remove useless c code

remove printk.c file
remove old test_ebpf file
implement `lookup_kallsyms` and `addr_from_symbol` using rust

* fix the weak linkage

* feat(kernel): 添加cfg-if依赖并优化panic模块的条件编译

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
linfeng
2025-03-27 14:16:10 +08:00
committed by GitHub
parent 4729ec69c4
commit 3d663af8a2
19 changed files with 88 additions and 2352 deletions

View File

@ -572,86 +572,6 @@
&emsp;&emsp;第二个字符串
#### `printk(const char* fmt, ...)`
##### 描述
&emsp;&emsp;该宏能够在控制台上以黑底白字格式化输出字符串.
##### 参数
**fmt**
&emsp;&emsp;源格式字符串
**...**
&emsp;&emsp;可变参数
#### `printk_color(unsigned int FRcolor, unsigned int BKcolor, const char* fmt, ...)`
##### 描述
&emsp;&emsp;在控制台上以指定前景色和背景色格式化输出字符串.
##### 参数
**FRcolor**
&emsp;&emsp;前景色
**BKcolor**
&emsp;&emsp;背景色
**fmt**
&emsp;&emsp;源格式字符串
**...**
&emsp;&emsp;可变参数
#### `int vsprintf(char *buf, const char *fmt, va_list args)`
##### 描述
&emsp;&emsp;按照fmt格式化字符串并将结果输出到buf中返回写入buf的字符数量
##### 参数
**buf**
&emsp;&emsp;输出缓冲区
**fmt**
&emsp;&emsp;源格式字符串
**args**
&emsp;&emsp;可变参数列表
#### `int sprintk(char *buf, const char *fmt, ...)`
##### 描述
&emsp;&emsp;按照fmt格式化字符串并将结果输出到buf中返回写入buf的字符数量
##### 参数
**buf**
&emsp;&emsp;输出缓冲区
**fmt**
&emsp;&emsp;源格式字符串
**...**
&emsp;&emsp;可变参数
### 内存操作
#### `void *memcpy(void *dst, const void *src, uint64_t size)`