> 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:48:31  up   1:54,  2 users,  load average: 0.43, 0.59, 0.72
This commit is contained in:
tracer-ysyx 2024-03-20 14:48:31 +08:00 committed by xinyangli
parent a1de9b1656
commit fd7c8c2700

View file

@ -18,7 +18,7 @@ void init_elf(const char *path) {
Elf32_Ehdr header;
Elf32_Shdr section_header[200], *psh;
func_table = (func_t *)malloc(func_table_size);
func_table = (func_t *)calloc(func_table_size, sizeof(func_t));
FAILED_GOTO(failed_nosym, func_table == NULL);
FAILED_GOTO(failed_nosym, fread(&header, sizeof(Elf32_Ehdr), 1, elf_file) <= 0);