]> git.itanic.dy.fi Git - linux-stable/commit
perf symbols: Allow for .plt without header
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 31 Jan 2023 13:16:22 +0000 (15:16 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 2 Feb 2023 00:51:31 +0000 (21:51 -0300)
commit60fbb3e49abe8421b677d5eee32fe7fb27b05e3b
tree50a633898fb7d4ad59c5922bf09ab032f46aed9b
parentb7dbc0be6e4f2a5268d76884d6651e29f95673ea
perf symbols: Allow for .plt without header

A static executable can have a .plt due to the presence of IFUNCs.  In
that case the .plt does not have a header. Check for whether there is a
header by comparing the number of entries to the number of relocation
entries.

Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20230131131625.6964-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c