Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 May 2018 08:34:14 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org>,  FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: Heads-up: linker (lld) changes for amd64 coming soon
Message-ID:  <CAPyFy2BFsvwCiPBpYmg7TkfxmB8NYhznBZz%2BX1BCU5gD4q8zAA@mail.gmail.com>
In-Reply-To: <CAPyFy2AjEJjryjgGCHAo107mkOUnFbKmkcMVFWQEKKbTEuu8AA@mail.gmail.com>
References:  <CAPyFy2AjEJjryjgGCHAo107mkOUnFbKmkcMVFWQEKKbTEuu8AA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 March 2018 at 22:14, Ed Maste <emaste@freebsd.org> wrote:
> Some changes related to the amd64 linker are nearly ready to be
> committed (within a week or three), so I'm sending this notice to
> request any final comments or concerns before these changes are made.

It took somewhat longer than a week or three, but these changes will
now happen quite soon.

> 1. Kostik (kib@) has a patch to start using kernel ifunc, with the
> first use being Supervisor Mode Access Prevention (SMAP) on amd64.
> This relies on linker support that is available in the in-tree lld and
> in contemporary binutils ld.bfd from ports, but not in the in-tree
> ld.bfd 2.17.50.

This is ready to be committed at any time.

> 2. WITH_LLD_IS_LD controls whether /usr/bin/ld is ld.bfd or ld.lld,
> and thus the linker used for linking ports. I plan to switch this to
> default on.

There was one significant remaining issue in the ports tree with lld
as /usr/bin/ld: lang/ghc. This was due (at least in part) to a bug in
lld's note handling. The bug is now fixed upstream and in FreeBSD in
r333401.

The latest version of ghc claims to have improved support for using
lld as the linker, and a lang/ghc update is currently in progress
(PR227968). Once this is committed I will request one more exp-run
with lld. As long as those results are acceptable, I'll then make the
switch to install lld as /usr/bin/ld on amd64.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2BFsvwCiPBpYmg7TkfxmB8NYhznBZz%2BX1BCU5gD4q8zAA>