diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index e0376094fa8b2458a2324063130c9564ac9cbd64..a2e994e2605f667dccbb33026a6f22b6309391ec 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;