> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 14:58:31  up   2:04,  2 users,  load average: 0.52, 0.53, 0.61
This commit is contained in:
tracer-ysyx 2024-03-20 14:58:31 +08:00 committed by xinyangli
parent a9e03f6461
commit b350c43d42

View file

@ -13,7 +13,6 @@ int func_table_len = 0, func_table_size = 8;
#endif
static int cmp_func_t(const void *a, const void *b) {
return ((func_t *)a)->start > ((func_t *)b)->start;
}
@ -70,7 +69,7 @@ void init_elf(const char *path) {
}
qsort(func_table, func_table_len, sizeof(func_t), cmp_func_t);
for(int i = 0; i < func_table_len; i++) {
func_t *f = &func_table[func_table_len];
func_t *f = &func_table[i];
// puts(func);
printf("%s: 0x%x - 0x%x\n", f->name, f->start, f->start + f->len);
}