diff options
author | Remi Bernon <rbernon@codeweavers.com> | 2020-08-21 18:52:37 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-09-04 14:38:15 -0300 |
commit | eac9a4342e5447cade4d484261a8992e2ec6f138 (patch) | |
tree | 842a3822bb2965ef25581fa5eec62716ef46dde6 /tools/perf/util/symbol.h | |
parent | ba0509dcb7f806403b23234320711c45be9dccec (diff) | |
download | linux-eac9a4342e5447cade4d484261a8992e2ec6f138.tar.gz linux-eac9a4342e5447cade4d484261a8992e2ec6f138.tar.bz2 linux-eac9a4342e5447cade4d484261a8992e2ec6f138.zip |
perf symbols: Try reading the symbol table with libbfd
Wine generates PE binaries for its code modules and also generates debug
files in PE or PDB formats, which perf cannot parse either.
Trying to read symbols on non-ELF binaries with libbfd, when supported,
makes it possible for perf to report symbols and annotations for Windows
applications running under Wine.
Because libbfd doesn't provide symbol size (probably because of some
backends not supporting it), we compute it by first sorting the symbols
by addresses and then considering that they are sequential in a given
section.
v3: Also include local and weak bfd symbols and mark them as such, only
global symbols were previously reported, and that caused a very
imprecise address to symbol resolution.
Signed-off-by: Remi Bernon <rbernon@codeweavers.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jacek Caban <jacek@codeweavers.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200821165238.1340315-2-rbernon@codeweavers.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index ff4f4c47e148..11fe71f46d14 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -175,6 +175,10 @@ int symbol__config_symfs(const struct option *opt __maybe_unused, struct symsrc; +#ifdef HAVE_LIBBFD_SUPPORT +int dso__load_bfd_symbols(struct dso *dso, const char *debugfile); +#endif + int dso__load_sym(struct dso *dso, struct map *map, struct symsrc *syms_ss, struct symsrc *runtime_ss, int kmodule); int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss); |