perf jit: Do not assume pgoff is zero
authorStefano Sanfilippo <ssanfilippo@chromium.org>
Thu, 13 Oct 2016 10:59:39 +0000 (03:59 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Oct 2016 14:07:39 +0000 (11:07 -0300)
commiteac05af2bf33aa9474482f1f19555adfd2cdf69d
tree3fedff670be6b35dd6cd4aef0b97e7598e645b54
parent7354ec7a86c0cc03bebb7f86af8f20a88b27c262
perf jit: Do not assume pgoff is zero

When calculating .eh_frame_hdr base and LUT offsets do not always assume
that pgoff is zero.

The assumption is false for DSOs built from the jitdump by perf inject,
because the ELF header did not exist in memory at sampling time.

Signed-off-by: Stefano Sanfilippo <ssanfilippo@chromium.org>
Signed-off-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: Anton Blanchard <anton@ozlabs.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1476356383-30100-6-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/unwind-libunwind-local.c