aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/Makefile1
-rw-r--r--tools/perf/util/symbol-elf.c3
-rw-r--r--tools/perf/util/symbol.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8beff9944f44..90cfecf7913a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -469,6 +469,7 @@ PYRF_OBJS += $(OUTPUT)util/xyarray.o
469ifdef NO_LIBELF 469ifdef NO_LIBELF
470 NO_DWARF := 1 470 NO_DWARF := 1
471 NO_DEMANGLE := 1 471 NO_DEMANGLE := 1
472 NO_LIBUNWIND := 1
472else 473else
473FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) 474FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS)
474ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y) 475ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF)),y)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 5b37e13f08fb..db0cc92cf2ea 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -183,6 +183,9 @@ int dso__synthesize_plt_symbols(struct dso *dso, struct symsrc *ss, struct map *
183 Elf *elf; 183 Elf *elf;
184 int nr = 0, symidx, err = 0; 184 int nr = 0, symidx, err = 0;
185 185
186 if (!ss->dynsym)
187 return 0;
188
186 elf = ss->elf; 189 elf = ss->elf;
187 ehdr = ss->ehdr; 190 ehdr = ss->ehdr;
188 191
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 2293a4a5af96..753699a20bc8 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1125,7 +1125,7 @@ int dso__load(struct dso *dso, struct map *map, symbol_filter_t filter)
1125 else 1125 else
1126 ret = -1; 1126 ret = -1;
1127 1127
1128 if (ret > 0 && runtime_ss->dynsym) { 1128 if (ret > 0) {
1129 int nr_plt; 1129 int nr_plt;
1130 1130
1131 nr_plt = dso__synthesize_plt_symbols(dso, runtime_ss, map, filter); 1131 nr_plt = dso__synthesize_plt_symbols(dso, runtime_ss, map, filter);