From c50fc0a43e33a6c3257c5cbb954cd747d7b9a680 Mon Sep 17 00:00:00 2001 From: Ananth N Mavinakayanahalli Date: Tue, 28 Apr 2015 17:35:38 +0530 Subject: perf probe ppc64le: Fix ppc64 ABIv2 symbol decoding ppc64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point (LEP). For purposes of probing, we need the LEP - the offset to which is encoded in st_other. Signed-off-by: Ananth N Mavinakayanahalli Reviewed-by: Srikar Dronamraju Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/ab9cc5e2b9de4cbaaf50f6ef2346a6a81100bad1.1430217967.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/powerpc/util/sym-handling.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/perf/arch/powerpc/util') diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 2de2cc484d6e..012a0f8098de 100644 --- a/tools/perf/arch/powerpc/util/sym-handling.c +++ b/tools/perf/arch/powerpc/util/sym-handling.c @@ -17,6 +17,13 @@ bool elf__needs_adjust_symbols(GElf_Ehdr ehdr) ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN; } + +#if defined(_CALL_ELF) && _CALL_ELF == 2 +void arch__elf_sym_adjust(GElf_Sym *sym) +{ + sym->st_value += PPC64_LOCAL_ENTRY_OFFSET(sym->st_other); +} +#endif #endif #if !defined(_CALL_ELF) || _CALL_ELF != 2 -- cgit v1.2.3-55-g7522