aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-11-21 13:49:44 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-12-09 08:46:05 -0300
commit3843b05d6ef20acbd4b0043e4ab7536602eb10ae (patch)
tree3428f401dfb60c002f35f2cb7836f1899d8ee2da /tools/perf/util
parentperf hists: Fix period symbol_conf.field_sep display (diff)
downloadlinux-dev-3843b05d6ef20acbd4b0043e4ab7536602eb10ae.tar.xz
linux-dev-3843b05d6ef20acbd4b0043e4ab7536602eb10ae.zip
perf symbols: Ignore ABS symbols when loading data maps
When loading symbols in a data mapping, ABS symbols (which has a value of SHN_ABS in its st_shndx) failed at elf_getscn(). And it marks the loading as a failure so already loaded symbols cannot be fixed up. I'm not sure what should be done. Just ignore them for now. :) Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1353502185-26521-19-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/symbol-elf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index db0cc92cf2ea..f63557b59c06 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -718,6 +718,17 @@ int dso__load_sym(struct dso *dso, struct map *map,
sym.st_value);
used_opd = true;
}
+ /*
+ * When loading symbols in a data mapping, ABS symbols (which
+ * has a value of SHN_ABS in its st_shndx) failed at
+ * elf_getscn(). And it marks the loading as a failure so
+ * already loaded symbols cannot be fixed up.
+ *
+ * I'm not sure what should be done. Just ignore them for now.
+ * - Namhyung Kim
+ */
+ if (sym.st_shndx == SHN_ABS)
+ continue;
sec = elf_getscn(runtime_ss->elf, sym.st_shndx);
if (!sec)