From nobody Mon Oct 6 06:29:00 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 5ABE52DE71F; Thu, 24 Jul 2025 13:50:35 +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=1753365035; cv=none; b=H3WyfoyDsn8z5RrPu9UKrtCzi2pF1YVkQz34t7Ojl1Tvvs9sk81amn7WUZPjE55yxQaRSfb933FcWCq9v4m9WBDS4qA49VNdPEtFiHc1VNPkjlYqK/SYLNrJCsMknIceWXzR4cHb3L+gaNfoGMnfyqdJkfyFgOTMJNkn13BPA58= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753365035; c=relaxed/simple; bh=BZNqAkUNOK9Nr6DHLj1baz+QKcwHjdeg9vOowOhVhiY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cjbcW7lc6KfnnaFaIFh0if66OTDD18HTjwwmlnnSGq57koNNYL/jOR+kVVj/cFv5OjG32QEE0wfvC+Msjgs4GpDLqzC7owJfTeVM8/YSQLMCBUxBM+xjgw2f6/JwJ4R1mwceCGZfqDAgaWTaSFnXrssmEvvknsWVU3LF4cHD5Eo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uRAMFOVb; 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="uRAMFOVb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBD49C4CEF6; Thu, 24 Jul 2025 13:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753365035; bh=BZNqAkUNOK9Nr6DHLj1baz+QKcwHjdeg9vOowOhVhiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uRAMFOVbhKpKMPxMRHqHc1oP2659cwFd1ukcgP9s/LBLq9vPnDOzvUT5CRDEUzwz2 aK3/2kdc/zgp+tyzQ5A0v3fOsliOWIw451BNfOCiI/nmmIznanYRucAMPKrep8COYx b2t7j+M4PDuQRD51kyJmW1q3yeFZp7Hxwq1Elmgs3z6rIG9/cBZuvcxoT0RXoReB8A EYc/Y5X/w2eV1AeOt2piI1ZePHF+dpj0kK8NwUpHJExETZBqDalvo7EtTbZ98mS6Xf XCZks7efxFLBaXpa4RaRAg2LDrZ9EZNfmQ41T0ThHkvBF6kkRjauuujRtv2w8bfBna DTjpPeAn+ga6A== From: Alexey Gladkov To: Masahiro Yamada , Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v5 09/10] kbuild: vmlinux.unstripped should always depend on .vmlinux.export.o Date: Thu, 24 Jul 2025 15:49:46 +0200 Message-ID: <2be01f4db6d5b4dc009af0b8ed058e6dc6a3bf7c.1753354215.git.legion@kernel.org> 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 fcc188d26ead..dbbe3bf0cf23 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 51367c2bfc21..433849ff7529 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