diff --git a/nemu/src/utils/elf-parser.c b/nemu/src/utils/elf-parser.c index 0584b71..fc67880 100644 --- a/nemu/src/utils/elf-parser.c +++ b/nemu/src/utils/elf-parser.c @@ -32,7 +32,7 @@ void init_elf(const char *path) { } 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("%s", shstrtab); + printf("%u", section_header[header.e_shstrndx].sh_offset); // if(symtab && strtab) break; }