]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kbuild: vdso_install: hide readelf warnings
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 31 Mar 2026 17:50:20 +0000 (19:50 +0200)
committerNicolas Schier <nsc@kernel.org>
Thu, 2 Apr 2026 15:50:39 +0000 (17:50 +0200)
If 'readelf -n' encounters a note it does not recognize it emits a
warning. This for example happens when inspecting a compat vDSO for
which the main kernel toolchain was not used.
However the relevant build ID note is always readable, so the
warnings are pointless.

Hide the warnings to make it possible to extract build IDs for more
architectures in the future.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20260331-kbuild-vdso-install-v2-2-606d0dc6beca@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>
scripts/Makefile.vdsoinst

index 214c561651cf5458c0279f174508187bdde03ae3..aed153b3120b3f94ed5c5a1a3123ba5a0c27eb43 100644 (file)
@@ -21,7 +21,7 @@ $$(dest): $(1) FORCE
 
 # Some architectures create .build-id symlinks
 ifneq ($(filter arm s390 sparc x86, $(SRCARCH)),)
-build-id-file := $$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
+build-id-file := $$(shell $(READELF) -n $(1) 2>/dev/null | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
 link := $(install-dir)/.build-id/$$(build-id-file).debug
 
 __default: $$(link)