Date: Wed, 7 Sep 2016 09:10:05 -0400 From: Ed Maste <emaste@freebsd.org> To: "freebsd-toolchain@freebsd.org" <freebsd-toolchain@freebsd.org> Subject: Re: Update on using LLVM's lld linker in the FreeBSD base system Message-ID: <CAPyFy2BOUgEifM%2BYiZsaPVQOL=-CoapiC-sswVHc93T=PoG%2Bvg@mail.gmail.com> In-Reply-To: <CAPyFy2D-j6djHHiXk9D3dmj5xXjKGgoOEnUK7rHvbc=Hc28dxA@mail.gmail.com> References: <CAPyFy2D-j6djHHiXk9D3dmj5xXjKGgoOEnUK7rHvbc=Hc28dxA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1 August 2016 at 17:40, Ed Maste <emaste@freebsd.org> wrote: > Over the past year or so I have been investigating the state of LLVM's > lld linker for use in the FreeBSD base system, to see if it could be > used as FreeBSD's system linker. > > ... > There are a few features used by the FreeBSD base system that lld > developers (intentionally) do not expect to implement, unless they're > reasonably widely used in a variety of different software. If they're > not implemented we can modify FreeBSD to avoid using them. I'm aware > of: > > -N/--omagic, used by some boot loader components. We can achieve the > same effect with a linker script. Warner addressed this for x86 boot components in r305353. We still have an issue: lld does not support -Ttext, but does have an -image-base option to set the start address. It would be nice to reconcile this and LLVM PR 30269 is open to track this for lld. > -dc, used by the rescue build. As long as object files are built > specifically for rescue we can probably use -fno-common instead. I briefly tried to get the rescue build working with lld, but was not successful and have just left it disabled in my tests. We can investigate this later. > -b binary to convert binary files into ELF objects, used by some > device drivers in kernel and module builds. We can use > objcopy(elfcopy) instead. There is now an lld change in progress to add support for -b binary: https://reviews.llvm.org/D24060
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2BOUgEifM%2BYiZsaPVQOL=-CoapiC-sswVHc93T=PoG%2Bvg>