All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Wang Nan <wangnan0@huawei.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	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.
Date: Thu, 2 Apr 2015 17:11:00 +0900	[thread overview]
Message-ID: <20150402081100.GB23913@sejong> (raw)
In-Reply-To: <551CD15C.5070605@huawei.com>

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

      reply	other threads:[~2015-04-02  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 14:08 [PATCH] perf: unwind: fix segbase for libunwind Wang Nan
2015-04-01 14:48 ` Ingo Molnar
2015-04-02  5:07   ` Wang Nan
2015-04-02  5:19     ` Wang Nan
2015-04-02  8:11       ` Namhyung Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402081100.GB23913@sejong \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.