mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Nathan Chancellor <nathan@kernel.org>, Nicolas Schier <nsc@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH 2/4] kbuild: vdso_install: hide readelf warnings
Date: Fri, 20 Mar 2026 17:36:54 +0100	[thread overview]
Message-ID: <20260320-kbuild-vdso-install-v1-2-e2e8a0970889@weissschuh.net> (raw)
In-Reply-To: <20260320-kbuild-vdso-install-v1-0-e2e8a0970889@weissschuh.net>

If 'readelf -n' encounters a note it does not recognize it emits a
warning. This for example happen 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 extrace build IDs for more
architectures in the future.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 scripts/Makefile.vdsoinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst
index 214c561651cf..aed153b3120b 100644
--- a/scripts/Makefile.vdsoinst
+++ b/scripts/Makefile.vdsoinst
@@ -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)

-- 
2.53.0


  parent reply	other threads:[~2026-03-20 16:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 16:36 [PATCH 0/4] kbuild: vdso_install: drop build ID architecture allow-list Thomas Weißschuh
2026-03-20 16:36 ` [PATCH 1/4] kbuild: vdso_install: split out the readelf invocation Thomas Weißschuh
2026-03-31 15:15   ` Nicolas Schier
2026-03-20 16:36 ` Thomas Weißschuh [this message]
2026-03-31 15:15   ` [PATCH 2/4] kbuild: vdso_install: hide readelf warnings Nicolas Schier
2026-03-20 16:36 ` [PATCH 3/4] kbuild: vdso_install: gracefully handle images without build ID Thomas Weißschuh
2026-03-31 15:15   ` Nicolas Schier
2026-03-20 16:36 ` [PATCH 4/4] kbuild: vdso_install: drop build ID architecture allow-list Thomas Weißschuh
2026-03-31 15:15   ` Nicolas Schier
2026-03-31 16:09 ` [PATCH 0/4] " Nicolas Schier
2026-03-31 17:09   ` Nicolas Schier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260320-kbuild-vdso-install-v1-2-e2e8a0970889@weissschuh.net \
    --to=linux@weissschuh.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®