diff --git a/scripts/Makefile.build b/scripts/Makefile.build index b897c7806711..381d99bdbdd2 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -171,7 +171,7 @@ ifdef CONFIG_MODVERSIONS # be compiled and linked to the kernel and/or modules. gen_symversions = \ - if $(NM) $@ 2>/dev/null | grep -q ' __export_symbol_'; then \ + if $(READELF) -sW $@ 2>/dev/null | grep -q '__export_symbol_'; then \ $(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ >> $(dot-target).cmd; \ fi