From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25B07C433DF for ; Tue, 20 Oct 2020 01:07:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0DE72173E for ; Tue, 20 Oct 2020 01:07:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I8jXoFBf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389793AbgJTBHS (ORCPT ); Mon, 19 Oct 2020 21:07:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728421AbgJTBHS (ORCPT ); Mon, 19 Oct 2020 21:07:18 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10AD7C0613CE; Mon, 19 Oct 2020 18:07:18 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id h21so432577iob.10; Mon, 19 Oct 2020 18:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=D/Mefsj+3OKX02UJFagduiRTFW1Pif4p9TwZBeovz3o=; b=I8jXoFBf0BPu/4YlJ7My47K79QVZsYMn5BEFG2voVpotjqOgHJFmlNIBx1MWjU9gGu EwmXWprxmBkQdNRuFmmH7Mt23bp9aFvinZC/Qp+XjQ6MMxqpSzQR8ZgNo/c0/SVShr65 G47EnZ6t6WNugH9jJ/gA7XgG/iV4GGon5A1o0BdlPPzbPBfSmDMwzEyG4a4BZtgPpssE eKrAUc1GEIUXqhYgXAzgY5Siw1tKrM0SsN8iP5LwIA1GCsYxrDob/gHenMRK7CwE43Uq iSrKLSpYFOWtQVIF66tCKNo5SgMB94nzGtRTIcf8RQx2nThbiiUbfyJsoLLPmyg0kvgA q0tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=D/Mefsj+3OKX02UJFagduiRTFW1Pif4p9TwZBeovz3o=; b=IlUOLVRFjKNDeB/FeK6vsdHJteFx9/pp0uxQJvPe4N40WgzI5dH5YTKIBOVCBIkQ92 zrnkQIfMkAr7RMoxQoh8P9pI4jTSaBs8rneU/MPXtcjAB1gVCn5sLHOAoNB0vXM804yv 0pmm9uUFjxohCB0vZwrOUf1CE4Vb20SbENsuBMcX5IP49CHWHuDpnM5DFYGn8gJYbUXc d/DWNzd8tIBMMEamU6UK6sEjm6Mw1Aqnk2G/is2Up30TxP7hDI2RugXH6QGe/6gEkNXS JaGQ1wIEz8B34CXuXTLam510x5dk7aLkpl5xoPDRTdX4w2ch4aFHw9SDwXJKsVLltq5K 3Svg== X-Gm-Message-State: AOAM531jQBs7MKCMSDAnLUKye3J09Pryx6uLWFrQ/P1V/5r9vwE6gS2z r+PtMqpwlkYA9PSTXlUgT+4= X-Google-Smtp-Source: ABdhPJw+uIieZkmAewbaRo3e9ZTxt14jHLTFkOJ54t8nGu5lDYF8HsfIgGD2fHcT6RpDbNg4/1PfEA== X-Received: by 2002:a02:7:: with SMTP id 7mr365606jaa.112.1603156037226; Mon, 19 Oct 2020 18:07:17 -0700 (PDT) Received: from ubuntu-m3-large-x86 ([2604:1380:45d1:2600::3]) by smtp.gmail.com with ESMTPSA id v90sm290746ili.75.2020.10.19.18.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 18:07:15 -0700 (PDT) Date: Mon, 19 Oct 2020 18:07:14 -0700 From: Nathan Chancellor To: Vincenzo Frascino Cc: Catalin Marinas , Will Deacon , 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 Subject: Re: [PATCH] arm64: vdso32: Allow ld.lld to properly link the VDSO Message-ID: <20201020010714.GA1817488@ubuntu-m3-large-x86> References: <20201013033947.2257501-1-natechancellor@gmail.com> <53b74ed0-f143-6870-1227-3d9663166068@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53b74ed0-f143-6870-1227-3d9663166068@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 10:59:47AM +0100, Vincenzo Frascino wrote: > > Hi Nathan, > > On 10/13/20 4:39 AM, 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 > > Signed-off-by: Nathan Chancellor > > Just a small nit on my side (see below) and as you already stated it requires > rebasing if we want to merge it in mainline. Otherwise: > > Reviewed-by: Vincenzo Frascino Thank you for the review! I do not have any personal preference on how fast this goes in. If we want it fast tracked, it can probably wait until after -rc1 anyways so I am going to keep it rebased on -next since presumably the kbuild tree will be merged into mainline by that point. If anyone else feels differently, let me know. > > --- > > > > NOTE: This patch is currently based on the kbuild tree due to the > > --build-id -> --build-id=sha1 change that Bill did. If the arm64 > > maintainers would prefer to take this patch, I can rebase it (althought > > presumably this won't hit mainline until at least 5.11 so it can > > probably just stay as is for now). > > > > arch/arm64/kernel/vdso32/Makefile | 23 ++++++++++++----------- > > 1 file changed, 12 insertions(+), 11 deletions(-) > > > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > > index 7f96a1a9f68c..1cf00c58805d 100644 > > --- a/arch/arm64/kernel/vdso32/Makefile > > +++ b/arch/arm64/kernel/vdso32/Makefile > > @@ -22,16 +22,21 @@ endif > > > > CC_COMPAT ?= $(CC) > > CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS) > > + > > +ifeq ($(LLVM),1) > > Nit: Here can we check 'ifneq ($(LLVM),)' for consistency with what the main > Makefile does? Sure, I will fix that up. > > +LD_COMPAT ?= $(LD) > > +else > > +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld > > +endif > > else > > CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc > > +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld > > endif > > > > cc32-option = $(call try-run,\ > > $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) > > cc32-disable-warning = $(call try-run,\ > > $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) > > -cc32-ldoption = $(call try-run,\ > > - $(CC_COMPAT) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) > > cc32-as-instr = $(call try-run,\ > > printf "%b\n" "$(1)" | $(CC_COMPAT) $(VDSO_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) > > > > @@ -122,14 +127,10 @@ dmbinstr := $(call cc32-as-instr,dmb ishld,-DCONFIG_AS_DMB_ISHLD=1) > > VDSO_CFLAGS += $(dmbinstr) > > VDSO_AFLAGS += $(dmbinstr) > > > > -VDSO_LDFLAGS := $(VDSO_CPPFLAGS) > > # From arm vDSO Makefile > > -VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 > > -VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 > > -VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft > > -VDSO_LDFLAGS += -Wl,--hash-style=sysv > > -VDSO_LDFLAGS += -Wl,--build-id=sha1 > > -VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd) > > +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 > > > > > > # Borrow vdsomunge.c from the arm vDSO > > @@ -189,8 +190,8 @@ quiet_cmd_vdsold_and_vdso_check = LD32 $@ > > cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check) > > > > quiet_cmd_vdsold = LD32 $@ > > - cmd_vdsold = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_LDFLAGS) \ > > - -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@ > > + cmd_vdsold = $(LD_COMPAT) $(VDSO_LDFLAGS) \ > > + -T $(filter %.lds,$^) $(filter %.o,$^) -o $@ > > quiet_cmd_vdsocc = CC32 $@ > > cmd_vdsocc = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_CFLAGS) -c -o $@ $< > > quiet_cmd_vdsocc_gettimeofday = CC32 $@ > > > > base-commit: 172aad81a882443eefe1bd860c4eddc81b14dd5b > > > > -- > Regards, > Vincenzo From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC4EEC433E7 for ; Tue, 20 Oct 2020 01:09:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5AE3921D6C for ; Tue, 20 Oct 2020 01:09:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xG6mInCj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="I8jXoFBf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AE3921D6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tcp+bvforNTUM/3GUi3M5GDpp6hrnI4DH4MfbBPRDkM=; b=xG6mInCjeqetJl3BIvZjiGlev l4HPRu9i0i5iQw4UKKhUU9sKAwaM6pZCpLMhJAxcV5WtHmpchp5hmZMcXiq7plALdllsj9wZh4HKP 36nXuFTudAF2vzMnIaarWJycZyG+MR8WI4ijc9goSXfZjILJ9NCfLR/fLlCIn0bjkNBX661Yil+n7 0mEIqL7CiRwGzhQCtW0ShSXjVb1RisNDldzgLXW+ou0p0bdTEiXPZ3H5sdw699xNu50+3pB7HL6C8 IXxcqThceM0Gj5wqsi6cajyEpnYcE/yA2/MK763L8w/LS1YlR5+r434fgKNSSOm0LfV+6VjWOVv+3 9xOeb+UaA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUg7Y-0006fE-AC; Tue, 20 Oct 2020 01:07:24 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUg7U-0006eb-Nm for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2020 01:07:21 +0000 Received: by mail-io1-xd43.google.com with SMTP id p15so493568ioh.0 for ; Mon, 19 Oct 2020 18:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=D/Mefsj+3OKX02UJFagduiRTFW1Pif4p9TwZBeovz3o=; b=I8jXoFBf0BPu/4YlJ7My47K79QVZsYMn5BEFG2voVpotjqOgHJFmlNIBx1MWjU9gGu EwmXWprxmBkQdNRuFmmH7Mt23bp9aFvinZC/Qp+XjQ6MMxqpSzQR8ZgNo/c0/SVShr65 G47EnZ6t6WNugH9jJ/gA7XgG/iV4GGon5A1o0BdlPPzbPBfSmDMwzEyG4a4BZtgPpssE eKrAUc1GEIUXqhYgXAzgY5Siw1tKrM0SsN8iP5LwIA1GCsYxrDob/gHenMRK7CwE43Uq iSrKLSpYFOWtQVIF66tCKNo5SgMB94nzGtRTIcf8RQx2nThbiiUbfyJsoLLPmyg0kvgA q0tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=D/Mefsj+3OKX02UJFagduiRTFW1Pif4p9TwZBeovz3o=; b=BKPRf9295sO3efAy1hTYHeU3kfnS1APetaZhNcaBsUKGSLcBLVDYWfzkq6tYVnAFHf aIsJAUzBwP8Dt6hm1s8nyj8rVuEbiXGvbLl2CrYVcruCuzTTAVNxDCEVZh+Lo8P3a/BM E46Gf7V6/6NAXrG3XC+90ncQa8IFoeP1D3v1Oxq2V7cGXqlgtYKQoMxrvzltKVnBLEKA WOXagr0vaZwekiVkyE88/qnKjEw1LTHaLCdU8crlRtlngrFZHUvOnjiaajuR3WkOEOTM ABD+ORnrckO2fla4eeoNo2iu6bX5vfKJIhtCBDr9b00UvqBChmtppPjUHYND6Rl+Jkua NNew== X-Gm-Message-State: AOAM533li0e4dcDIYgK0alOAK9BH9JR+nlEaErC5+X0tkZLcINlhW2yh 5znxy/l5jBZaXDHgKjMp3ps= X-Google-Smtp-Source: ABdhPJw+uIieZkmAewbaRo3e9ZTxt14jHLTFkOJ54t8nGu5lDYF8HsfIgGD2fHcT6RpDbNg4/1PfEA== X-Received: by 2002:a02:7:: with SMTP id 7mr365606jaa.112.1603156037226; Mon, 19 Oct 2020 18:07:17 -0700 (PDT) Received: from ubuntu-m3-large-x86 ([2604:1380:45d1:2600::3]) by smtp.gmail.com with ESMTPSA id v90sm290746ili.75.2020.10.19.18.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 18:07:15 -0700 (PDT) Date: Mon, 19 Oct 2020 18:07:14 -0700 From: Nathan Chancellor To: Vincenzo Frascino Subject: Re: [PATCH] arm64: vdso32: Allow ld.lld to properly link the VDSO Message-ID: <20201020010714.GA1817488@ubuntu-m3-large-x86> References: <20201013033947.2257501-1-natechancellor@gmail.com> <53b74ed0-f143-6870-1227-3d9663166068@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <53b74ed0-f143-6870-1227-3d9663166068@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201019_210720_789472_9BA51CD9 X-CRM114-Status: GOOD ( 36.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kbuild@vger.kernel.org, Catalin Marinas , Masahiro Yamada , Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 19, 2020 at 10:59:47AM +0100, Vincenzo Frascino wrote: > > Hi Nathan, > > On 10/13/20 4:39 AM, 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 > > Signed-off-by: Nathan Chancellor > > Just a small nit on my side (see below) and as you already stated it requires > rebasing if we want to merge it in mainline. Otherwise: > > Reviewed-by: Vincenzo Frascino Thank you for the review! I do not have any personal preference on how fast this goes in. If we want it fast tracked, it can probably wait until after -rc1 anyways so I am going to keep it rebased on -next since presumably the kbuild tree will be merged into mainline by that point. If anyone else feels differently, let me know. > > --- > > > > NOTE: This patch is currently based on the kbuild tree due to the > > --build-id -> --build-id=sha1 change that Bill did. If the arm64 > > maintainers would prefer to take this patch, I can rebase it (althought > > presumably this won't hit mainline until at least 5.11 so it can > > probably just stay as is for now). > > > > arch/arm64/kernel/vdso32/Makefile | 23 ++++++++++++----------- > > 1 file changed, 12 insertions(+), 11 deletions(-) > > > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile > > index 7f96a1a9f68c..1cf00c58805d 100644 > > --- a/arch/arm64/kernel/vdso32/Makefile > > +++ b/arch/arm64/kernel/vdso32/Makefile > > @@ -22,16 +22,21 @@ endif > > > > CC_COMPAT ?= $(CC) > > CC_COMPAT += $(CC_COMPAT_CLANG_FLAGS) > > + > > +ifeq ($(LLVM),1) > > Nit: Here can we check 'ifneq ($(LLVM),)' for consistency with what the main > Makefile does? Sure, I will fix that up. > > +LD_COMPAT ?= $(LD) > > +else > > +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld > > +endif > > else > > CC_COMPAT ?= $(CROSS_COMPILE_COMPAT)gcc > > +LD_COMPAT ?= $(CROSS_COMPILE_COMPAT)ld > > endif > > > > cc32-option = $(call try-run,\ > > $(CC_COMPAT) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) > > cc32-disable-warning = $(call try-run,\ > > $(CC_COMPAT) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) > > -cc32-ldoption = $(call try-run,\ > > - $(CC_COMPAT) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) > > cc32-as-instr = $(call try-run,\ > > printf "%b\n" "$(1)" | $(CC_COMPAT) $(VDSO_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) > > > > @@ -122,14 +127,10 @@ dmbinstr := $(call cc32-as-instr,dmb ishld,-DCONFIG_AS_DMB_ISHLD=1) > > VDSO_CFLAGS += $(dmbinstr) > > VDSO_AFLAGS += $(dmbinstr) > > > > -VDSO_LDFLAGS := $(VDSO_CPPFLAGS) > > # From arm vDSO Makefile > > -VDSO_LDFLAGS += -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1 > > -VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 > > -VDSO_LDFLAGS += -nostdlib -shared -mfloat-abi=soft > > -VDSO_LDFLAGS += -Wl,--hash-style=sysv > > -VDSO_LDFLAGS += -Wl,--build-id=sha1 > > -VDSO_LDFLAGS += $(call cc32-ldoption,-fuse-ld=bfd) > > +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 > > > > > > # Borrow vdsomunge.c from the arm vDSO > > @@ -189,8 +190,8 @@ quiet_cmd_vdsold_and_vdso_check = LD32 $@ > > cmd_vdsold_and_vdso_check = $(cmd_vdsold); $(cmd_vdso_check) > > > > quiet_cmd_vdsold = LD32 $@ > > - cmd_vdsold = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_LDFLAGS) \ > > - -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@ > > + cmd_vdsold = $(LD_COMPAT) $(VDSO_LDFLAGS) \ > > + -T $(filter %.lds,$^) $(filter %.o,$^) -o $@ > > quiet_cmd_vdsocc = CC32 $@ > > cmd_vdsocc = $(CC_COMPAT) -Wp,-MD,$(depfile) $(VDSO_CFLAGS) -c -o $@ $< > > quiet_cmd_vdsocc_gettimeofday = CC32 $@ > > > > base-commit: 172aad81a882443eefe1bd860c4eddc81b14dd5b > > > > -- > Regards, > Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel