> 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
 13:06:38  up   0:04,  2 users,  load average: 0.63, 0.54, 0.26
This commit is contained in:
tracer-ysyx 2024-03-17 13:06:38 +08:00 committed by xinyangli
parent f186e14fb0
commit 32de3d30e5

View file

@ -31,8 +31,8 @@ void init_elf(const char *path) {
printf("strtab: %u %u\n", strtab->sh_size, strtab->sh_offset);
}
FAILED_GOTO(failed_shstrtab, fseek(elf_file, section_header[header.e_shstrndx].sh_offset, SEEK_SET) != 0);
FAILED_GOTO(failed_shstrtab, fread(shstrtab, sizeof(Elf32_Sym), section_header[header.e_shstrndx].sh_size, elf_file) <= 0);
printf("%u", section_header[header.e_shstrndx].sh_offset);
FAILED_GOTO(failed_shstrtab, fread(shstrtab, sizeof(Elf32_Sym), section_header[header.e_shstrndx].sh_size, elf_file) <= 0);
// if(symtab && strtab) break;
}