From: Will Deacon <will@kernel.org>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: linux-kbuild@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] arm64: vdso32: Allow ld.lld to properly link the VDSO
Date: Tue, 20 Oct 2020 12:37:38 +0100 [thread overview]
Message-ID: <20201020113738.GC16084@willie-the-truck> (raw)
In-Reply-To: <20201020011406.1818918-1-natechancellor@gmail.com>
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 <ndesaulniers@google.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
Cheers, I'll try to remember to queue this at -rc1 but please feel free to
resend then to remind me :)
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-20 11:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 3:39 [PATCH] arm64: vdso32: Allow ld.lld to properly link the VDSO Nathan Chancellor
2020-10-13 22:37 ` Nick Desaulniers
2020-10-19 9:59 ` Vincenzo Frascino
2020-10-20 1:07 ` Nathan Chancellor
2020-10-20 1:14 ` [PATCH v2] " Nathan Chancellor
2020-10-20 11:37 ` Will Deacon [this message]
2020-10-26 14:22 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201020113738.GC16084@willie-the-truck \
--to=will@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=vincenzo.frascino@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox