Skip to content
Commit eac9a434 authored by Remi Bernon's avatar Remi Bernon Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarRemi Bernon <rbernon@codeweavers.com>
Acked-by: default avatarJiri 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ba0509dc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment