From: Adrian Hunter Date: Fri, 20 Jan 2023 12:34:52 +0000 (+0200) Subject: perf symbols: Do not check ss->dynsym twice X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5fec9b171cd80616e52e463ae5ae155483078004;p=linux.git perf symbols: Do not check ss->dynsym twice ss->dynsym is checked to be not NULL twice. Remove the first check because, in fact, there can be a plt with no dynsym, which is something that will be dealt with later. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/r/20230120123456.12449-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 990a2c6037bbb..87b82507c2051 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -386,9 +386,6 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss) Elf *elf; int nr = 0, symidx, err = -1; - if (!ss->dynsym) - return 0; - elf = ss->elf; ehdr = ss->ehdr;