]> git.itanic.dy.fi Git - linux-stable/commitdiff
perf symbols: Do not check ss->dynsym twice
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 20 Jan 2023 12:34:52 +0000 (14:34 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 22 Jan 2023 21:10:23 +0000 (18:10 -0300)
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 <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20230120123456.12449-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c

index 990a2c6037bbba74b4718d63f25d612efa6b4bb9..87b82507c20518762507dd3f6b0d68086babe3ac 100644 (file)
@@ -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;