author: Masahiro Yamada <masahiroy@kernel.org> 2021-08-19 09:01:14 +0900
committer: Masahiro Yamada <masahiroy@kernel.org> 2021-09-03 08:17:20 +0900
commit: 52d83df682c82055961531853c066f4f16e234ea
parent: 2185a7e4b0ade86c2c57fc63d4a7535c40254bd0
Commit Summary:
Diffstat:
1 file changed, 7 insertions, 1 deletion
diff --git a/scripts/gen_ksymdeps.sh b/scripts/gen_ksymdeps.sh
index 1324986e1362..725e8c9c1b53 100755
--- a/scripts/gen_ksymdeps.sh
+++ b/scripts/gen_ksymdeps.sh
@@ -4,7 +4,13 @@
set -e
# List of exported symbols
-ksyms=$($NM $1 | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z)
+#
+# If the object has no symbol, $NM warns 'no symbols'.
+# Suppress the stderr.
+# TODO:
+# Use -q instead of 2>/dev/null when we upgrade the minimum version of
+# binutils to 2.37, llvm to 13.0.0.
+ksyms=$($NM $1 2>/dev/null | sed -n 's/.*__ksym_marker_\(.*\)/\1/p' | tr A-Z a-z)
if [ -z "$ksyms" ]; then
exit 0