> compile NEMU

221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 23:48:04 up 5 days, 11:56,  3 users,  load average: 0.71, 0.49, 0.46
This commit is contained in:
tracer-ics2023
2024-09-10 23:48:06 +08:00
committed by zzy
parent 0c6c29b5f0
commit 54eb6a6c81

View File

@ -100,7 +100,7 @@ void init_elf(const char* elf_file) {
// filling ftrace
assert(pstrt != NULL && pstrt != NULL);
for (int i = 0; i < symt_sz; i ++) {
if (ELF_ST_TYPE(psymt[i].st_info) & STT_FUNC) {
if (ELF_ST_TYPE(psymt[i].st_info) == STT_FUNC) {
// Warning due to elf_ftrace is global variable so you don't need to set '\0' in the end
// strncpy(elf_ftrace[elf_ftrace_size].fname, pstrt + psymt[i].st_name,
// sizeof(elf_ftrace[0].fname) - 1);