[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200502154945.GA3361319@ubuntu-s3-xlarge-x86>
Date: Sat, 2 May 2020 08:49:45 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: "Maciej W. Rozycki" <macro@...ux-mips.org>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Masahiro Yamada <masahiroy@...nel.org>,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com, linux-kbuild@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Fangrui Song <maskray@...gle.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Dmitry Golovin <dima@...ovin.in>,
Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: [PATCH v4 4/5] MIPS: VDSO: Use $(LD) instead of $(CC) to link
VDSO
On Sat, May 02, 2020 at 02:50:34PM +0100, Maciej W. Rozycki wrote:
> On Tue, 28 Apr 2020, Nathan Chancellor wrote:
>
> > Before this patch, LD=ld.lld did nothing:
> >
> > $ llvm-readelf -p.comment arch/mips/vdso/vdso.so.dbg | sed 's/(.*//'
> > String dump of section '.comment':
> > [ 0] ClangBuiltLinux clang version 11.0.0
>
> What does it mean "did nothing", is `arch/mips/vdso/vdso.so.dbg.raw' not
> produced? Where does `arch/mips/vdso/vdso.so.dbg' come from then?
>
> Maciej
A better wording might be "Before this patch, specifying a linker like
ld.lld via the LD variable was not respected by the MIPS VDSO". I should
also probably expand on the second paragraph, maybe something like:
When clang is built in a default configuration, it first attempts to use
the target triple's default linker then the system's default linker,
which is almost always ld.bfd. To use ld.lld, '-fuse-ld=lld' must be
passed to clang. However, we do not use -fuse-ld=lld because it can be
brittle and we have support for invoking $(LD) directly because we have
separate compilation and link steps. See commit fe00e50b2db8c ("ARM:
8858/1: vdso: use $(LD) instead of $(CC) to link VDSO") and
commit 691efbedc60d2 ("arm64: vdso: use $(LD) instead of $(CC) to link
VDSO") for examples of doing this in the VDSO.
Powered by blists - more mailing lists