All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: don't adjust symbols in vDSO
@ 2015-06-24 16:17 Will Deacon
  2015-06-25 13:32 ` Adrian Hunter
  0 siblings, 1 reply; 10+ messages in thread
From: Will Deacon @ 2015-06-24 16:17 UTC (permalink / raw)
  To: acme
  Cc: linux-kernel, kristina.martsenko, Will Deacon,
	Vladimir Nikulichev, Adrian Hunter, Namhyung Kim

Commit 922d0e4d9f04 ("perf tools: Adjust symbols in VDSO") changed the
ELF symbol parsing so that the vDSO is treated the same as ET_EXEC and
ET_REL binaries despite being an ET_DYN.

This causes objdump, which expects relative addresses, not to produce
any output in conjunction with perf annotate, which cheerfully passes
absolute addresses when trying to disassemble vDSO functions.

This patch avoids marking the vDSO as requiring adjustment of symbol
addresses, allowing the relative program counter to be used instead.

Cc: Vladimir Nikulichev <nvs@tbricks.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Reported-by: Kristina Martsenko <kristina.martsenko@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---

Not sure why I've just started seeing this, but it appears to affect
both x86 and arm64. Also, if I revert the patch above then the issue
it supposedly fixed doesn't resurface. Maybe it was just masking another
bug that has since been addressed?

 tools/perf/util/symbol-elf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index a7ab6063e038..ba4f9bf2765d 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -706,7 +706,6 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
 		GElf_Shdr shdr;
 		ss->adjust_symbols = (ehdr.e_type == ET_EXEC ||
 				ehdr.e_type == ET_REL ||
-				dso__is_vdso(dso) ||
 				elf_section_by_name(elf, &ehdr, &shdr,
 						     ".gnu.prelink_undo",
 						     NULL) != NULL);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-06-27  9:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24 16:17 [PATCH] perf tools: don't adjust symbols in vDSO Will Deacon
2015-06-25 13:32 ` Adrian Hunter
2015-06-26 12:23   ` Will Deacon
2015-06-26 13:55     ` Adrian Hunter
2015-06-26 14:58       ` Will Deacon
2015-06-26 15:18         ` Andy Lutomirski
2015-06-26 15:29           ` Will Deacon
2015-06-26 15:44             ` Andy Lutomirski
2015-06-27  9:03               ` Will Deacon
2015-06-26 15:35         ` Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.