diff options
Diffstat (limited to 'tools/perf/util/symbol-elf.c')
-rw-r--r-- | tools/perf/util/symbol-elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index a34321e9b44d..a811c13a74d6 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
@@ -837,7 +837,8 @@ int dso__load_sym(struct dso *dso, struct map *map, | |||
837 | sec = syms_ss->symtab; | 837 | sec = syms_ss->symtab; |
838 | shdr = syms_ss->symshdr; | 838 | shdr = syms_ss->symshdr; |
839 | 839 | ||
840 | if (elf_section_by_name(elf, &ehdr, &tshdr, ".text", NULL)) | 840 | if (elf_section_by_name(runtime_ss->elf, &runtime_ss->ehdr, &tshdr, |
841 | ".text", NULL)) | ||
841 | dso->text_offset = tshdr.sh_addr - tshdr.sh_offset; | 842 | dso->text_offset = tshdr.sh_addr - tshdr.sh_offset; |
842 | 843 | ||
843 | if (runtime_ss->opdsec) | 844 | if (runtime_ss->opdsec) |