From nobody Wed Dec 17 23:07:02 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22AAEC61D85 for ; Tue, 21 Nov 2023 23:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234962AbjKUX5X (ORCPT ); Tue, 21 Nov 2023 18:57:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234933AbjKUX5Q (ORCPT ); Tue, 21 Nov 2023 18:57:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD40CE7 for ; Tue, 21 Nov 2023 15:57:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA1C7C433C9; Tue, 21 Nov 2023 23:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700611032; bh=PgDod9JVK1SlTO6PB/we26pgwxZ6Hugtd6ddfhtvips=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P5Oqx2adFYIoQ9k4t/Fy/+5td7AJw0Ktf33vV/fGcP8SzAfragsJVRdICPCn1rAiq DY+8pX8mR5/DxUtJobAPYiON00qCGoJvj2BP+5n2et1TWEtFdgFs7egce9cUf+jEoM QuJAxXvWLW5r0KMCYoemcPkKHSz6roL/PrJIA8KHkR+/mWH94Fs+p2YMq8QI05E6ou s/mPI0QIWI4BLxziJ6Est+vJPCMnCuC9lG/Og/BKs8zJ3RLi+amuJSo3nbUqiRZ5bi rhC+VekE2qEghO/hzfZWrvY282W1JlDo00ewShT6Eo4W3aeFl1AH+6vr3odn1i+x/i lKcGM2Gr47bOg== From: Masahiro Yamada To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: Masahiro Yamada , Andy Lutomirski , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] x86: vdso: simplify obj-y addition Date: Wed, 22 Nov 2023 08:56:59 +0900 Message-Id: <20231121235701.239606-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231121235701.239606-1-masahiroy@kernel.org> References: <20231121235701.239606-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add objects to obj-y in a more straightforward way. CONFIG_X86_32 and CONFIG_IA32_EMULATION are not enabled simultaneously, but even if they are, Kbuild graciously deduplicates obj-y entries. Signed-off-by: Masahiro Yamada --- arch/x86/entry/vdso/Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 2038d9c8e527..cbfb5aab5e9c 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -18,11 +18,6 @@ OBJECT_FILES_NON_STANDARD :=3D y # Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. KCOV_INSTRUMENT :=3D n =20 -VDSO64-$(CONFIG_X86_64) :=3D y -VDSOX32-$(CONFIG_X86_X32_ABI) :=3D y -VDSO32-$(CONFIG_X86_32) :=3D y -VDSO32-$(CONFIG_IA32_EMULATION) :=3D y - # files to link into the vdso vobjs-y :=3D vdso-note.o vclock_gettime.o vgetcpu.o vobjs32-y :=3D vdso32/note.o vdso32/system_call.o vdso32/sigreturn.o @@ -38,11 +33,11 @@ OBJECT_FILES_NON_STANDARD_vma.o :=3D n OBJECT_FILES_NON_STANDARD_extable.o :=3D n =20 # vDSO images to build -vdso_img-$(VDSO64-y) +=3D 64 -vdso_img-$(VDSOX32-y) +=3D x32 -vdso_img-$(VDSO32-y) +=3D 32 +obj-$(CONFIG_X86_64) +=3D vdso-image-64.o +obj-$(CONFIG_X86_X32_ABI) +=3D vdso-image-x32.o +obj-$(CONFIG_X86_32) +=3D vdso-image-32.o vdso32-setup.o +obj-$(CONFIG_IA32_EMULATION) +=3D vdso-image-32.o vdso32-setup.o =20 -obj-$(VDSO32-y) +=3D vdso32-setup.o OBJECT_FILES_NON_STANDARD_vdso32-setup.o :=3D n =20 vobjs :=3D $(foreach F,$(vobjs-y),$(obj)/$F) @@ -53,9 +48,6 @@ $(obj)/vdso.o: $(obj)/vdso.so targets +=3D vdso.lds $(vobjs-y) targets +=3D vdso32/vdso32.lds $(vobjs32-y) =20 -# Build the vDSO image C files and link them in. -vdso_img_objs :=3D $(vdso_img-y:%=3Dvdso-image-%.o) -obj-y +=3D $(vdso_img_objs) targets +=3D $(foreach x, 64 x32 32, vdso-image-$(x).c vdso$(x).so vdso$(x= ).so.dbg) =20 CPPFLAGS_vdso.lds +=3D -P -C --=20 2.40.1