[PATCH] D25467: [ELF] - Alternative fix to prevent possible crash on large output.

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 17:55:47 PDT 2016

----- Original Message -----
> From: "Ed Maste via llvm-commits" <llvm-commits at lists.llvm.org>
> To: "Rui Ueyama" <ruiu at google.com>
> Cc: "Davide Italiano" <dccitaliano at gmail.com>, "George Rimar" <grimar at accesssoftek.com>,
> reviews+D25467+public+369c42ccb7da824b at reviews.llvm.org, "llvm-commits" <llvm-commits at lists.llvm.org>
> Sent: Tuesday, October 25, 2016 8:50:49 AM
> Subject: Re: [PATCH] D25467: [ELF] - Alternative fix to prevent possible crash on large output.
> On 17 October 2016 at 17:26, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> >
> >  - FreeBSD: what is the status of building the entire FreeBSD
> >  system with
> > LLD? Can it build everything including the kernel?
> Outstanding FreeBSD/lld issues are tracked in http://llvm.org/pr23214
> .
> I have booted a lld-linked FreeBSD x86-64 kernel in the past, maybe
> two months or so ago, but it has since regressed. It still builds but
> the kernel crashes early on, and I haven't yet bisected to find out
> when this started happening. I've been testing ToT FreeBSD built with
> ToT LLD, so it's possible it's a FreeBSD change that's responsible.
> There are two additional issues with lld on FreeBSD x86-64:
> 1. Boot loaders. We used to use -omagic to produce small boot
> binaries
> with combined .text and .data. FreeBSD has since switched to using a
> linker script for the boot binaries, although it seems there's
> something amiss with that change (it does not work correctly with GNU
> ld either).
> http://llvm.org/pr30415
> https://bugs.freebsd.org/213491
> The EFI loader also fails to build with lld: http://llvm.org/pr30406
> I see there's a followup question from Petr Hosek in the PR that
> needs
> a response.
> 2. Rescue binaries
> FreeBSD's /rescue directory contains a statically-linked binary
> that's
> built as a combination of multiple utilities, and it selects the
> utility to invoke based on argv[0]. (Similar to BusyBox or toybox.)
> The build uses the -dc option, currently not supported by lld. I
> haven't looked at this in detail yet as it's been a lower priority.
> In FreeBSD the next priority for us is linking the arm64 userland and
> kernel with lld. I think the userland is in good shape although I
> haven't done comprehensive testing. The kernel currently fails to
> link
> due to http://llvm.org/pr30267. Andrew Turner applied a workaround to
> the FreeBSD source, and has booted an lld-linked FreeBSD/arm64
> kernel.
> Bringing lld 3.9 into FreeBSD is in progress, along with the update
> to
> Clang 3.9. It will be installed as /usr/bin/ld.lld to facilitate
> -fuse-ld=lld. Once this is complete I am going to request an
> experimental build (known as an exp-run in FreeBSD) of the 26,000
> packages in the ports tree using lld 3.9.
> > - Ports: how much mature is PowerPC port? We want to support both
> > BE and LE
> > PowerPCs. It's also interesting to work on an open-source ISA,
> > RISC-V,
> > because the patches to support the RISC-V architecture are being
> > merged now.

Some time ago, I got it to the point of being able to link simple PPC64/BE binaries. It still needs long-branch handling, TLS, etc. and work on PPC32 and PPC64/LE.


> We're interested in arm, i386, mips (64/32), powerpc (64/32), and
> RISC-V in FreeBSD.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

More information about the llvm-commits mailing list