[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] kbuild: remove duplicate dependencies from .mod files
With CONFIG_TRIM_UNUSED_SYMS, if a module has enough dependencies to
exceed the default xargs command line size limit, the output is split
into multiple lines, which can result in used symbols getting trimmed.

This change removes duplicate dependencies, which will reduce the
probability of this happening and makes .mod files smaller and easier
to read.

Signed-off-by: Sami Tolvanen <>
scripts/ | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/ b/scripts/
index a1730d42e5f3..a083bcec19d3 100644
--- a/scripts/
+++ b/scripts/
@@ -257,7 +257,7 @@ endef

# List module undefined symbols (or empty line if not enabled)
-cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | xargs echo
+cmd_undef_syms = $(NM) $< | sed -n 's/^ *U //p' | sort -u | xargs echo
cmd_undef_syms = echo
base-commit: bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9

 \ /
  Last update: 2020-02-10 14:20    [W:0.111 / U:1.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site