Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753172AbbDBIRf (ORCPT ); Thu, 2 Apr 2015 04:17:35 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:59348 "EHLO lgemrelse6q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752357AbbDBIRa (ORCPT ); Thu, 2 Apr 2015 04:17:30 -0400 X-Original-SENDERIP: 10.177.220.203 X-Original-MAILFROM: namhyung@kernel.org Date: Thu, 2 Apr 2015 17:11:00 +0900 From: Namhyung Kim To: Wang Nan Cc: Ingo Molnar , acme@kernel.org, jolsa@kernel.org, mingo@redhat.com, lizefan@huawei.com, pi3orama@163.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: unwind: fix segbase for libunwind. Message-ID: <20150402081100.GB23913@sejong> References: <1427897332-145581-1-git-send-email-wangnan0@huawei.com> <20150401144839.GA17340@gmail.com> <551CCE8B.5060704@huawei.com> <551CD15C.5070605@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <551CD15C.5070605@huawei.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 Content-Length: 1199 Lines: 36 On Thu, Apr 02, 2015 at 01:19:24PM +0800, Wang Nan wrote: > Additional information: > > With following patch it seems to work: > > diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c > index 476268c..1177f02 100644 > --- a/tools/perf/util/symbol-elf.c > +++ b/tools/perf/util/symbol-elf.c > @@ -1049,8 +1049,10 @@ new_symbol: > if (demangled != NULL) > elf_name = demangled; > } > - f = symbol__new(sym.st_value, sym.st_size, > + f = symbol__new(sym.st_value + map->pgoff, sym.st_size, > GELF_ST_BIND(sym.st_info), elf_name); > free(demangled); > if (!f) > goto out_elf_end; > > > result: [SNIP] > > However, I think this is only a temporary solutsion. What we need is to obay both > Offset and VirtAddr in PHDR. Agreed. Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/