]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 19 Aug 2021 00:01:14 +0000 (09:01 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 26 Aug 2021 02:16:43 +0000 (11:16 +0900)
commit8514f6b9682ff68b52ab350a98d64d395cc48bb9
treed83d4604799776814037103303f97a13f220d34b
parentf652c0ecae28172eb46755250749dd235279b1e6
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y

When CONFIG_TRIM_UNUSED_KSYMS is enabled, I see some warnings like this:

  nm: arch/x86/entry/vdso/vdso32/note.o: no symbols

$NM (both GNU nm and llvm-nm) warns when no symbol is found in the
object. Suppress the stderr.

Fangrui Song mentioned binutils>=2.37 `nm -q` can be used to suppress
"no symbols" [1], and llvm-nm>=13.0.0 supports -q as well.

We cannot use it for now, but note it as a TODO.

[1]: https://sourceware.org/bugzilla/show_bug.cgi?id=27408

Fixes: bbda5ec671d3 ("kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
scripts/gen_ksymdeps.sh