> 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
 15:49:37  up   2:55,  2 users,  load average: 0.34, 0.58, 0.45
This commit is contained in:
tracer-ysyx 2024-03-20 15:49:37 +08:00 committed by xinyangli
parent d6b293da6f
commit 15c0ad2cd5

View file

@ -23,7 +23,7 @@ func_t *get_func(vaddr_t addr) {
if(func_table[mid].start <= addr) l = mid + 1; if(func_table[mid].start <= addr) l = mid + 1;
else r = mid; else r = mid;
} }
return &func_table[l]; return &func_table[l-1];
} }
void init_elf(const char *path) { void init_elf(const char *path) {
@ -84,6 +84,7 @@ void init_elf(const char *path) {
} }
printf("%s\n", get_func(0x80000010)->name); printf("%s\n", get_func(0x80000010)->name);
printf("%s\n", get_func(0x80000012)->name); printf("%s\n", get_func(0x80000012)->name);
printf("%s\n", get_func(0x7fffffff)->name);
success = true; success = true;
failed: failed:
for(int i = 0; i < func_table_len; i++) { for(int i = 0; i < func_table_len; i++) {