diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index e0376094fa8b..a2e994e2605f 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -232,6 +232,9 @@ int dso__synthesize_plt_symbols(struct dso *dso, char *name, struct map *map, if (symstrs == NULL) goto out_elf_end; + if (symstrs->d_size == 0) + goto out_elf_end; + nr_rel_entries = shdr_rel_plt.sh_size / shdr_rel_plt.sh_entsize; plt_offset = shdr_plt.sh_offset;