summaryrefslogtreecommitdiffstats
path: root/lib/notifier-error-inject.c
diff options
context:
space:
mode:
authorRemi Bernon <rbernon@codeweavers.com>2021-09-09 21:26:36 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-09-10 16:45:19 +0200
commitd2930ede5218be28413a00130a6895d14393c325 (patch)
treec6af8cadea04bd284bf5e07d9e7f5bd38b7504ac /lib/notifier-error-inject.c
parentperf scripts python: Fix passing arguments to stackcollapse report (diff)
downloadlinux-d2930ede5218be28413a00130a6895d14393c325.tar.xz
linux-d2930ede5218be28413a00130a6895d14393c325.zip
perf symbol: Look for ImageBase in PE file to compute .text offset
Instead of using the file offset in the debug file. This fixes a regression from 00a3423492bc90be ("perf symbols: Make dso__load_bfd_symbols() load PE files from debug cache only"), causing incorrect symbol resolution when debug file have been stripped from non-debug sections (in which case its .text section is empty and doesn't have any file position). The debug files could also be created with a different file alignment, and have different file positions from the mmap-ed binary, or have the section reordered. This instead looks for the file image base, using the corresponding bfd *ABS* symbols. As PE symbols only have 4 bytes, it also needs to keep .text section vma high bits. Signed-off-by: Remi Bernon <rbernon@codeweavers.com> Fixes: 00a3423492bc90be ("perf symbols: Make dso__load_bfd_symbols() load PE files from debug cache only") Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Nicholas Fraser <nfraser@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/20210909192637.4139125-1-rbernon@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'lib/notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions