Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4406426pxu; Tue, 20 Oct 2020 16:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0vRbVpviubv1lWoLKKDrbDC6hTJ5oOC6PWzDEBUNjBldGLOlceJQXaVBuAq4dDMJzrU3h X-Received: by 2002:a05:6402:395:: with SMTP id o21mr435042edv.2.1603237982709; Tue, 20 Oct 2020 16:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603237982; cv=none; d=google.com; s=arc-20160816; b=M3/4F6sWygyoHl+BiUOYm8fJcUvzDailKHUGWcO/iSWg+TlFzXGNxMo/F+FWC2kM7i 9GWk7peSjxRBcOxypyuIcyMMe6qCnaMdTHcGJpRLS1O4UV+/i8XD5t7T3YtpkSuzgmai 6oczyYUPzLMkxR+H8M+QhhjprziwJJbjyjMcWY67ROf+qA5P8Y0LSQJLOYB/iEHrafFS t31PS0ExZ6TvH1CLnXg8BzAm+95GL4RJEG2hjlRTHoxImt5rVXtRGXworrlDHUWvZnDS fDp5rNByEYf5SkX4gNCwDf62swWJcC77Tngxma3TaeHgO/jeSb32CWW7o4a0c6jMPvO2 DdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qsOQMflSxejlwRJ4LhuUBCTujtoNcSpvtpyJp5Ds1gg=; b=dkzaHoQALyaPnDEouvZwrzojULWtzko7KNjZKRtq7W1AL+6f5MDJQV4iMox2lk+iQI KxilMBbEGRPBk1D0XBDGAXY4Mz8C3EcALYYg3OyVCjHqzo/ca0wHfqy8By6Q7Rmk9UZF aDKJOf/o8dsaMtBR24gnFm+2KxHmCoa92LYaU0x6mUwFptB2foIF0VanKBFWfx1mmAPJ cs7usoCnI3jJMTB4VgXli4qFUvAcINYcrybCEaMBDM78jU/8znRn62HYVNMTbo/FX6Y+ LVRV+NJ5hcfy4j6q7aqZFm1qXbv1+gkXpLB0Xhic4v2uQl+AFE50i7bAWcIVU6yLVOQU zhJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NURBkORO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gw19si137703ejb.650.2020.10.20.16.52.40; Tue, 20 Oct 2020 16:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NURBkORO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393391AbgJTLhp (ORCPT + 99 others); Tue, 20 Oct 2020 07:37:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:52826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393361AbgJTLho (ORCPT ); Tue, 20 Oct 2020 07:37:44 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 31BE22173E; Tue, 20 Oct 2020 11:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603193863; bh=2zCir24O0t7kmJm4N3nVBboIcPTEjdjSKiHza2K8S34=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NURBkOROng+LL+bOQ3x30vblL7WTwJloDS6KRFVoVeuo3MtICYbXRNx2otIOg9s6P wHWiYEmNueTGJvDFiYBco85k01Z589Uo1P1UKeHfuQkdzTLKcjDZhy3y1q4m33w/90 y1i4Sdj35FmZ0McEsj6K5+Fs/IX4VGIH42XgJzFI= Date: Tue, 20 Oct 2020 12:37:38 +0100 From: Will Deacon To: Nathan Chancellor Cc: Catalin Marinas , Masahiro Yamada , linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nick Desaulniers , Vincenzo Frascino Subject: Re: [PATCH v2] arm64: vdso32: Allow ld.lld to properly link the VDSO Message-ID: <20201020113738.GC16084@willie-the-truck> References: <20201013033947.2257501-1-natechancellor@gmail.com> <20201020011406.1818918-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201020011406.1818918-1-natechancellor@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 06:14:07PM -0700, Nathan Chancellor wrote: > As it stands now, the vdso32 Makefile hardcodes the linker to ld.bfd > using -fuse-ld=bfd with $(CC). This was taken from the arm vDSO > Makefile, as the comment notes, done in commit d2b30cd4b722 ("ARM: > 8384/1: VDSO: force use of BFD linker"). > > Commit fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC) to > link VDSO") changed that Makefile to use $(LD) directly instead of > through $(CC), which matches how the rest of the kernel operates. Since > then, LD=ld.lld means that the arm vDSO will be linked with ld.lld, > which has shown no problems so far. > > Allow ld.lld to link this vDSO as we do the regular arm vDSO. To do > this, we need to do a few things: > > * Add a LD_COMPAT variable, which defaults to $(CROSS_COMPILE_COMPAT)ld > with gcc and $(LD) if LLVM is 1, which will be ld.lld, or > $(CROSS_COMPILE_COMPAT)ld if not, which matches the logic of the main > Makefile. It is overrideable for further customization and avoiding > breakage. > > * Eliminate cc32-ldoption, which matches commit 055efab3120b ("kbuild: > drop support for cc-ldoption"). > > With those, we can use $(LD_COMPAT) in cmd_ldvdso and change the flags > from compiler linker flags to linker flags directly. We eliminate > -mfloat-abi=soft because it is not handled by the linker. > > Link: https://github.com/ClangBuiltLinux/linux/issues/1033 > Reported-by: Nick Desaulniers > Reviewed-by: Nick Desaulniers > Tested-by: Nick Desaulniers > Reviewed-by: Vincenzo Frascino > Signed-off-by: Nathan Chancellor > --- Cheers, I'll try to remember to queue this at -rc1 but please feel free to resend then to remind me :) Will