diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index ec5ec1c9d9b561f79a7cc0f5a64bda8cafcc9223..9fb5e9e9f1617beeb18aaecb92a71d7fce2a74ce 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -736,7 +736,7 @@ int dso__load_sym(struct dso *dso, struct map *map, if (symstrs == NULL) goto out_elf_end; - sec_strndx = elf_getscn(elf, ehdr.e_shstrndx); + sec_strndx = elf_getscn(runtime_ss->elf, runtime_ss->ehdr.e_shstrndx); if (sec_strndx == NULL) goto out_elf_end;