From nobody Sat Sep 27 20:32:35 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B82934AAF3; Mon, 18 Aug 2025 16:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755536301; cv=none; b=fGP5SUdnSeDYmpKPchPIy+G00+teand55qdlCjn48AJ5oB0FqEGU+XRvrTRH+kbtDQ1tLK+xcvTQ6s7c3v62+y5m8bCf13G9ptQANd+lBOyKEiO5XoJfJv2jk53/f1kNS66mUEpJvr/ZdeP7zCfko9IhUxhNenqtUbOZoVBjqrk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755536301; c=relaxed/simple; bh=Rqws0mfAyO89sg9MY6EW3IwoREbSyg6Bwvu3ZMYwTr4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V+eP2yCBQ9vr3tyxwGrYCS7zOwpN1H/22cizFnq1/WLPjkjJP6Y4RO9sbTmkKM544rAM0A6+PDSN66Jx98IhwEGo6VABwOYivQxktsjsCoCb/8dZ0wxUN0RiD9sGYLXb2iyBPG+wMyWqj/8kkAx7aPAR0gbsI+6nOTJfs6wUcnI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Dmz4FAiB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Dmz4FAiB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B66BFC4CEF1; Mon, 18 Aug 2025 16:58:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755536300; bh=Rqws0mfAyO89sg9MY6EW3IwoREbSyg6Bwvu3ZMYwTr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dmz4FAiBn1SYCwojJLS4ZwOMsBHRF41inGx/JexLqlhLl+XI1Rpcy+ycv2XShntun J6giMjsk3sg0TiAhfzVaxi8fYUEf8MFXZ61JjlxkSi/uxWIZRpGTSdfrTyuLJN7KQB h/DNwT57Rc7IonfFMA9TutyjjF5w1VTvmkKPeOxDZ+xWEBFcG5LHrMVcb7GNHK0ikU tiy5y2gVX5cCSK+CAoch6j+oGzg9P3yrBXlAxQe/g6nAkzu3YjkaxFIWCk8biX25WG 6/5D8QMZeRi/fP59BtA2uE7XB7thiFQ/MHvEUr5Mrvol4KhqxcCwj1Z3XS6CoyjuPF +Ax2kdIR+qCCA== From: Alexey Gladkov To: Nathan Chancellor , Nicolas Schier , Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v7 8/8] kbuild: vmlinux.unstripped should always depend on .vmlinux.export.o Date: Mon, 18 Aug 2025 18:55:02 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since .vmlinux.export.c is used to add generated by modpost modaliases for builtin modules the .vmlinux.export.o is no longer optional and should always be created. The generation of this file is not dependent on CONFIG_MODULES. Signed-off-by: Alexey Gladkov --- scripts/Makefile.vmlinux | 9 ++------- scripts/link-vmlinux.sh | 5 +---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index fcc188d26ead1..dbbe3bf0cf234 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -53,11 +53,6 @@ endif # vmlinux.unstripped # ------------------------------------------------------------------------= --- =20 -ifdef CONFIG_MODULES -targets +=3D .vmlinux.export.o -vmlinux.unstripped: .vmlinux.export.o -endif - ifdef CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX vmlinux.unstripped: arch/$(SRCARCH)/tools/vmlinux.arch.o =20 @@ -72,8 +67,8 @@ cmd_link_vmlinux =3D \ $< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)" "$@"; \ $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) =20 -targets +=3D vmlinux.unstripped -vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE +targets +=3D vmlinux.unstripped .vmlinux.export.o +vmlinux.unstripped: scripts/link-vmlinux.sh vmlinux.o .vmlinux.export.o $(= KBUILD_LDS) FORCE +$(call if_changed_dep,link_vmlinux) ifdef CONFIG_DEBUG_INFO_BTF vmlinux.unstripped: $(RESOLVE_BTFIDS) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 51367c2bfc21e..433849ff7529e 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -73,10 +73,7 @@ vmlinux_link() objs=3D"${objs} .builtin-dtbs.o" fi =20 - if is_enabled CONFIG_MODULES; then - objs=3D"${objs} .vmlinux.export.o" - fi - + objs=3D"${objs} .vmlinux.export.o" objs=3D"${objs} init/version-timestamp.o" =20 if [ "${SRCARCH}" =3D "um" ]; then --=20 2.50.1