[PATCH v2 1/4] kbuild: vdso_install: split out the readelf invocation

From: Thomas Weißschuh

Date: Tue Mar 31 2026 - 13:54:45 EST


Split up the logic as some upcoming changes to the readelf invocation
would create a very long line otherwise.

Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
Reviewed-by: Nicolas Schier <nsc@xxxxxxxxxx>
---
scripts/Makefile.vdsoinst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Makefile.vdsoinst b/scripts/Makefile.vdsoinst
index ac85f9a4a569..214c561651cf 100644
--- a/scripts/Makefile.vdsoinst
+++ b/scripts/Makefile.vdsoinst
@@ -21,7 +21,8 @@ $$(dest): $(1) FORCE

# Some architectures create .build-id symlinks
ifneq ($(filter arm s390 sparc x86, $(SRCARCH)),)
-link := $(install-dir)/.build-id/$$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p').debug
+build-id-file := $$(shell $(READELF) -n $(1) | sed -n 's@^.*Build ID: \(..\)\(.*\)@\1/\2@p')
+link := $(install-dir)/.build-id/$$(build-id-file).debug

__default: $$(link)
$$(link): $$(dest) FORCE

--
2.53.0