mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf test: Fix vmlinux failure on s390x
On s390x perf test 1 failed. It turned out that commit4a084ecfc8("perf report: Fix module symbol adjustment for s390x") was incorrect. The previous implementation in dso__load_sym() is also suitable for s390x. Therefore this patch undoes commit4a084ecfc8. Signed-off-by: Thomas-Mich Richter <[email protected]> Cc: Hendrik Brueckner <[email protected]> Cc: Zvonko Kosic <[email protected]> Fixes:4a084ecfc8("perf report: Fix module symbol adjustment for s390x") LPU-Reference: [email protected] Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
090657c9fb
commit
b28503a3fe
3 changed files with 1 additions and 18 deletions
|
|
@ -18,12 +18,4 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
|
|||
return false;
|
||||
return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN;
|
||||
}
|
||||
|
||||
void arch__adjust_sym_map_offset(GElf_Sym *sym,
|
||||
GElf_Shdr *shdr __maybe_unused,
|
||||
struct map *map)
|
||||
{
|
||||
if (map->type == MAP__FUNCTION)
|
||||
sym->st_value += map->start;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -810,12 +810,6 @@ static u64 ref_reloc(struct kmap *kmap)
|
|||
void __weak arch__sym_update(struct symbol *s __maybe_unused,
|
||||
GElf_Sym *sym __maybe_unused) { }
|
||||
|
||||
void __weak arch__adjust_sym_map_offset(GElf_Sym *sym, GElf_Shdr *shdr,
|
||||
struct map *map __maybe_unused)
|
||||
{
|
||||
sym->st_value -= shdr->sh_addr - shdr->sh_offset;
|
||||
}
|
||||
|
||||
int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
|
||||
struct symsrc *runtime_ss, int kmodule)
|
||||
{
|
||||
|
|
@ -996,7 +990,7 @@ int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss,
|
|||
|
||||
/* Adjust symbol to map to file offset */
|
||||
if (adjust_kernel_syms)
|
||||
arch__adjust_sym_map_offset(&sym, &shdr, map);
|
||||
sym.st_value -= shdr.sh_addr - shdr.sh_offset;
|
||||
|
||||
if (strcmp(section_name,
|
||||
(curr_dso->short_name +
|
||||
|
|
|
|||
|
|
@ -344,9 +344,6 @@ int setup_intlist(struct intlist **list, const char *list_str,
|
|||
#ifdef HAVE_LIBELF_SUPPORT
|
||||
bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
|
||||
void arch__sym_update(struct symbol *s, GElf_Sym *sym);
|
||||
void arch__adjust_sym_map_offset(GElf_Sym *sym,
|
||||
GElf_Shdr *shdr __maybe_unused,
|
||||
struct map *map __maybe_unused);
|
||||
#endif
|
||||
|
||||
#define SYMBOL_A 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue