diff --git a/nemu/src/utils/elf-parser.c b/nemu/src/utils/elf-parser.c index b75d40d..1872f2e 100644 --- a/nemu/src/utils/elf-parser.c +++ b/nemu/src/utils/elf-parser.c @@ -22,8 +22,10 @@ void init_elf(const char *path) { psh = section_header + i; if (psh->sh_type == SHT_SYMTAB) { symtab = psh; + break; } else if (psh->sh_type == SHT_STRTAB) { strtab = psh; + break; } }