Skip to content

Commit c07cb29

Browse files
committed
kbuild: try readelf first in gen_symversions
deepin inclusion category: performance Instead of nm, readelf is more faster, and significantly improve build speed when enable CONFIG_GENKSYMS. Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 7db4ed0 commit c07cb29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ ifdef CONFIG_MODVERSIONS
171171
# be compiled and linked to the kernel and/or modules.
172172

173173
gen_symversions = \
174-
if $(NM) $@ 2>/dev/null | grep -q ' __export_symbol_'; then \
174+
if $(READELF) -sW $@ 2>/dev/null | grep -q '__export_symbol_'; then \
175175
$(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
176176
>> $(dot-target).cmd; \
177177
fi

0 commit comments

Comments
 (0)