From patchwork Sun Nov 7 16:18:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 12606831 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B78EC433EF for ; Sun, 7 Nov 2021 16:20:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0D1A6137D for ; Sun, 7 Nov 2021 16:20:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D0D1A6137D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OWZEtRowokvgKCc3IWri3notiDDf1XmoqenfTQFdPC8=; b=440L7fYPxfhPYn ls/KFxOVuRrGar8AXGeGeq7TdGJX455fZS0C17711Zmm87KLUUXHqosyIb652o1Zbz+cVw9nNtgI+ dA8BGtmXgodnp/ZUU7zJRPlG7WFCuvghzuwcBq3FmSaoYffDQXaBdp5UqbSVxdTIqTrH0VU94AtYI TFzbwsdG3biALHOcCE50rEgpKehTaKqEbOvVzDnlX6JjPJUNr4RfhSS22JHh1KNB7gMGDGCkE+DdF 5aGETOhyYSw/Bigg8PTELKJSbxAvFzLAYlH1yFe6pZvJHTNWIPsrD8SN9hsNleBqjbiOQ2jMYcsOQ LchScv3chdL7oH8EMocw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjkt5-00EXh0-20; Sun, 07 Nov 2021 16:19:19 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mjkt0-00EXeH-QJ; Sun, 07 Nov 2021 16:19:16 +0000 Received: from grover.. (133-32-232-101.west.xps.vectant.ne.jp [133.32.232.101]) (authenticated) by conuserg-07.nifty.com with ESMTP id 1A7GIBqt010505; Mon, 8 Nov 2021 01:18:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 1A7GIBqt010505 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1636301892; bh=L7NVYUTKQRaSf3zmJ7tch8Fq/p/5g/YPanoKCU7mZ9s=; h=From:To:Cc:Subject:Date:From; b=acS5ty7TejmKNVXuHe8WleVU0yc73HKZdR6FpjGOoILDOykqn7zm+zUtQmsO90Fvn KM8qRESTJaE8UfbwrhecoCGZgwmFl/wdt1o1cmxK4SptZG6ZbzlGIGSWzkqjDAN83o 3SYUl9zD26dnbDgKb9m8XgtqdCo3uXaOfm/ZAaFYpvhW0oOgspDqERwgqHMcKw01fI FkHz4syr2wdmp2dXMcjEWUL4y8NuVuJAv6VNW17TO2iC8Lctu3W6oaHWbw2z79DSy+ jIVlOYXhi4mAHBcVSnbcxv78Fd6HNW5fLue4d+gro9TZjTF3xD34yNH4t8Ks6+ZHeZ 9CbI45ArFpDLQ== X-Nifty-SrcIP: [133.32.232.101] From: Masahiro Yamada To: Will Deacon , Catalin Marinas , linux-arm-kernel@lists.infradead.org Cc: clang-built-linux@googlegroups.com, Masahiro Yamada , Kees Cook , Nathan Chancellor , Nick Desaulniers , Peter Collingbourne , "Peter Zijlstra (Intel)" , Sami Tolvanen , Vincenzo Frascino , linux-kernel@vger.kernel.org Subject: [PATCH] arm64: vdso: remove -nostdlib compiler flag Date: Mon, 8 Nov 2021 01:18:02 +0900 Message-Id: <20211107161802.323125-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211107_081915_229241_54C0F82E X-CRM114-Status: GOOD ( 10.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The -nostdlib option requests the compiler to not use the standard system startup files or libraries when linking. It is effective only when $(CC) is used as a linker driver. Since commit 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO"), $(LD) is directly used, hence -nostdlib is unneeded. Signed-off-by: Masahiro Yamada --- arch/arm64/kernel/vdso/Makefile | 2 +- arch/arm64/kernel/vdso32/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index 945e6bb326e3..700767dfd221 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -23,7 +23,7 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti # potential future proofing if we end up with internal calls to the exported # routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so # preparation in build-time C")). -ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ +ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \ -Bsymbolic --build-id=sha1 -n $(btildflags-y) -T ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile index c8fec493a450..6c01b63ff56d 100644 --- a/arch/arm64/kernel/vdso32/Makefile +++ b/arch/arm64/kernel/vdso32/Makefile @@ -102,7 +102,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__ # From arm vDSO Makefile VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1 VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096 -VDSO_LDFLAGS += -nostdlib -shared --hash-style=sysv --build-id=sha1 +VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1 # Borrow vdsomunge.c from the arm vDSO