From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbbFXQR3 (ORCPT ); Wed, 24 Jun 2015 12:17:29 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:34578 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbbFXQRX (ORCPT ); Wed, 24 Jun 2015 12:17:23 -0400 From: Will Deacon To: acme@redhat.com Cc: linux-kernel@vger.kernel.org, kristina.martsenko@arm.com, Will Deacon , Vladimir Nikulichev , Adrian Hunter , Namhyung Kim Subject: [PATCH] perf tools: don't adjust symbols in vDSO Date: Wed, 24 Jun 2015 17:17:03 +0100 Message-Id: <1435162623-20075-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Adrian Hunter Cc: Namhyung Kim Reported-by: Kristina Martsenko Signed-off-by: Will Deacon --- 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