diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-11-21 07:49:44 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-09 06:46:05 -0500 |
commit | 3843b05d6ef20acbd4b0043e4ab7536602eb10ae (patch) | |
tree | 3428f401dfb60c002f35f2cb7836f1899d8ee2da /tools/perf/util/symbol-elf.c | |
parent | c0d246b85fc7d42688d7a5d999ea671777caf65b (diff) |
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/symbol-elf.c')
-rw-r--r-- | tools/perf/util/symbol-elf.c | 11 |
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, | |||
718 | sym.st_value); | 718 | sym.st_value); |
719 | used_opd = true; | 719 | used_opd = true; |
720 | } | 720 | } |
721 | /* | ||
722 | * When loading symbols in a data mapping, ABS symbols (which | ||
723 | * has a value of SHN_ABS in its st_shndx) failed at | ||
724 | * elf_getscn(). And it marks the loading as a failure so | ||
725 | * already loaded symbols cannot be fixed up. | ||
726 | * | ||
727 | * I'm not sure what should be done. Just ignore them for now. | ||
728 | * - Namhyung Kim | ||
729 | */ | ||
730 | if (sym.st_shndx == SHN_ABS) | ||
731 | continue; | ||
721 | 732 | ||
722 | sec = elf_getscn(runtime_ss->elf, sym.st_shndx); | 733 | sec = elf_getscn(runtime_ss->elf, sym.st_shndx); |
723 | if (!sec) | 734 | if (!sec) |