diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/arch/s390/util/sym-handling.c | 8 | ||||
| -rw-r--r-- | tools/perf/util/symbol-elf.c | 8 | ||||
| -rw-r--r-- | tools/perf/util/symbol.h | 3 |
3 files changed, 1 insertions, 18 deletions
diff --git a/tools/perf/arch/s390/util/sym-handling.c b/tools/perf/arch/s390/util/sym-handling.c index e103f6e46afe..581d4c5a896b 100644 --- a/tools/perf/arch/s390/util/sym-handling.c +++ b/tools/perf/arch/s390/util/sym-handling.c | |||
| @@ -18,12 +18,4 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) | |||
| 18 | return false; | 18 | return false; |
| 19 | return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN; | 19 | return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN; |
| 20 | } | 20 | } |
| 21 | |||
| 22 | void arch__adjust_sym_map_offset(GElf_Sym *sym, | ||
| 23 | GElf_Shdr *shdr __maybe_unused, | ||
| 24 | struct map *map) | ||
| 25 | { | ||
| 26 | if (map->type == MAP__FUNCTION) | ||
| 27 | sym->st_value += map->start; | ||
| 28 | } | ||
| 29 | #endif | 21 | #endif |
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 5c39f420111e..9cf781f0d8a2 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
| @@ -810,12 +810,6 @@ static u64 ref_reloc(struct kmap *kmap) | |||
| 810 | void __weak arch__sym_update(struct symbol *s __maybe_unused, | 810 | void __weak arch__sym_update(struct symbol *s __maybe_unused, |
| 811 | GElf_Sym *sym __maybe_unused) { } | 811 | GElf_Sym *sym __maybe_unused) { } |
| 812 | 812 | ||
| 813 | void __weak arch__adjust_sym_map_offset(GElf_Sym *sym, GElf_Shdr *shdr, | ||
| 814 | struct map *map __maybe_unused) | ||
| 815 | { | ||
| 816 | sym->st_value -= shdr->sh_addr - shdr->sh_offset; | ||
| 817 | } | ||
| 818 | |||
| 819 | int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, | 813 | int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, |
| 820 | struct symsrc *runtime_ss, int kmodule) | 814 | struct symsrc *runtime_ss, int kmodule) |
| 821 | { | 815 | { |
| @@ -996,7 +990,7 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, | |||
| 996 | 990 | ||
| 997 | /* Adjust symbol to map to file offset */ | 991 | /* Adjust symbol to map to file offset */ |
| 998 | if (adjust_kernel_syms) | 992 | if (adjust_kernel_syms) |
| 999 | arch__adjust_sym_map_offset(&sym, &shdr, map); | 993 | sym.st_value -= shdr.sh_addr - shdr.sh_offset; |
| 1000 | 994 | ||
| 1001 | if (strcmp(section_name, | 995 | if (strcmp(section_name, |
| 1002 | (curr_dso->short_name + | 996 | (curr_dso->short_name + |
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 2bd6a1f01a1c..aad99e7e179b 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h | |||
| @@ -344,9 +344,6 @@ int setup_intlist(struct intlist **list, const char *list_str, | |||
| 344 | #ifdef HAVE_LIBELF_SUPPORT | 344 | #ifdef HAVE_LIBELF_SUPPORT |
| 345 | bool elf__needs_adjust_symbols(GElf_Ehdr ehdr); | 345 | bool elf__needs_adjust_symbols(GElf_Ehdr ehdr); |
| 346 | void arch__sym_update(struct symbol *s, GElf_Sym *sym); | 346 | void arch__sym_update(struct symbol *s, GElf_Sym *sym); |
| 347 | void arch__adjust_sym_map_offset(GElf_Sym *sym, | ||
| 348 | GElf_Shdr *shdr __maybe_unused, | ||
| 349 | struct map *map __maybe_unused); | ||
| 350 | #endif | 347 | #endif |
| 351 | 348 | ||
| 352 | #define SYMBOL_A 0 | 349 | #define SYMBOL_A 0 |
