Re: [PATCH] perf: unwind: fix segbase for libunwind.

From: Namhyung Kim
Date: Thu Apr 02 2015 - 04:17:38 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/