aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index e290429e9c00..da2f07f1af8f 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -956,11 +956,15 @@ static int dso__load_sym(struct dso *self, struct map *map,
956 956
957 elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) { 957 elf_symtab__for_each_symbol(syms, nr_syms, idx, sym) {
958 struct symbol *f; 958 struct symbol *f;
959 const char *elf_name; 959 const char *elf_name = elf_sym__name(&sym, symstrs);
960 char *demangled = NULL; 960 char *demangled = NULL;
961 int is_label = elf_sym__is_label(&sym); 961 int is_label = elf_sym__is_label(&sym);
962 const char *section_name; 962 const char *section_name;
963 963
964 if (kernel && session->ref_reloc_sym.name != NULL &&
965 strcmp(elf_name, session->ref_reloc_sym.name) == 0)
966 perf_session__reloc_vmlinux_maps(session, sym.st_value);
967
964 if (!is_label && !elf_sym__is_a(&sym, map->type)) 968 if (!is_label && !elf_sym__is_a(&sym, map->type))
965 continue; 969 continue;
966 970
@@ -973,7 +977,6 @@ static int dso__load_sym(struct dso *self, struct map *map,
973 if (is_label && !elf_sec__is_a(&shdr, secstrs, map->type)) 977 if (is_label && !elf_sec__is_a(&shdr, secstrs, map->type))
974 continue; 978 continue;
975 979
976 elf_name = elf_sym__name(&sym, symstrs);
977 section_name = elf_sec__name(&shdr, secstrs); 980 section_name = elf_sec__name(&shdr, secstrs);
978 981
979 if (kernel || kmodule) { 982 if (kernel || kmodule) {