From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752298AbbFYNfI (ORCPT ); Thu, 25 Jun 2015 09:35:08 -0400 Received: from mga14.intel.com ([192.55.52.115]:28436 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751256AbbFYNfD (ORCPT ); Thu, 25 Jun 2015 09:35:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,677,1427785200"; d="scan'208";a="717514324" Message-ID: <558C02DD.4010700@intel.com> Date: Thu, 25 Jun 2015 16:32:13 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Will Deacon , acme@redhat.com CC: linux-kernel@vger.kernel.org, kristina.martsenko@arm.com, Vladimir Nikulichev , Namhyung Kim Subject: Re: [PATCH] perf tools: don't adjust symbols in vDSO References: <1435162623-20075-1-git-send-email-will.deacon@arm.com> In-Reply-To: <1435162623-20075-1-git-send-email-will.deacon@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/06/15 19:17, Will Deacon wrote: > 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? No the problem still appears on older kernels. Probably could look at the vdso section/program headers to decide if it needs adjustment or not. > > 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); >