]> git.baikalelectronics.ru Git - kernel.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Sep 2021 10:26:26 +0000 (12:26 +0200)
commitaca141d2f004c2e9e630c32e4efb5a8b4cfe8715
tree2a1b74a8ea6dafd981349494f8e2db43ce6ce810
parentb79169baf823c56dbb7636a520b73ba3fd52dd52
kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y

[ Upstream commit 52d83df682c82055961531853c066f4f16e234ea ]

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: 9617140ea764 ("kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/gen_ksymdeps.sh