From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752059AbbFZMXU (ORCPT ); Fri, 26 Jun 2015 08:23:20 -0400 Received: from foss.arm.com ([217.140.101.70]:59988 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbbFZMXM (ORCPT ); Fri, 26 Jun 2015 08:23:12 -0400 Date: Fri, 26 Jun 2015 13:23:08 +0100 From: Will Deacon To: Adrian Hunter Cc: "acme@redhat.com" , "linux-kernel@vger.kernel.org" , Kristina Martsenko , Vladimir Nikulichev , Namhyung Kim Subject: Re: [PATCH] perf tools: don't adjust symbols in vDSO Message-ID: <20150626122308.GC9791@arm.com> References: <1435162623-20075-1-git-send-email-will.deacon@arm.com> <558C02DD.4010700@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558C02DD.4010700@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 25, 2015 at 02:32:13PM +0100, Adrian Hunter wrote: > 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. Can you be more specific, please? I tried with a 3.16 kernel (that I happen to be running on my box) but perf doesn't even detect the vdso there, regardless of this patch. > Probably could look at the vdso section/program headers to decide if it > needs adjustment or not. Did the x86 kernel change in this regard? Why isn't the vDSO always ET_DYN? Will