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 ifdef NO_LIBELF NO_DWARF := 1 NO_DEMANGLE := 1 + NO_LIBUNWIND := 1 else FLAGS_LIBELF=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) ifneq ($(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 * Elf *elf; int nr = 0, symidx, err = 0; + if (!ss->dynsym) + return 0; + elf = ss->elf; ehdr = ss->ehdr; 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) else ret = -1; - if (ret > 0 && runtime_ss->dynsym) { + if (ret > 0) { int nr_plt; nr_plt = dso__synthesize_plt_symbols(dso, runtime_ss, map, filter);