[llvm-dev] Contributing LLD for Mach-O

Shoaib Meenai via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 2 11:22:20 PST 2020

We’re hoping to get some linking speedups, similar to how LLD for ELF and COFF ended up being faster than the existing system linkers, though of course it’s hard to say how ld64’s design and efficiency compares to those other system linkers. In particular, we’re excited about the potential of speedups from parallelization and using the LLVM data structures instead of the STL ones.

From: David Blaikie <dblaikie at gmail.com>
Date: Saturday, February 29, 2020 at 2:15 PM
To: Shoaib Meenai <smeenai at fb.com>
Cc: "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org>, Jez Ng <jezng at fb.com>
Subject: Re: [llvm-dev] Contributing LLD for Mach-O

Awesome :) out of curiosity, are there any particular features/characteristics/benefits you're hoping for compared to the MacOS system linker?

On Fri, Feb 28, 2020 at 1:32 PM Shoaib Meenai via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi all,

We’re planning to contribute a new implementation of LLD for Mach-O, using the same design as the COFF and ELF ports. This design has proven to work very well for those ports, and we’re keen to explore it for Mach-O as well. Our work is based on an initial prototype created by Peter Collingbourne and Rui Ueyama.

Our initial commit is up for review at https://reviews.llvm.org/D75382<https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D75382&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=FsUJ3zm22ZnHwLpD3M0eika9YJ5VYGAKgWXVbeDI5gs&s=upNikuhsap52-7XAVMILW83qrO15V8-QgRnwZvBc5Tg&e=>. We’ve intentionally stripped down this initial commit as much as possible to ease reviewing; we’ve kept it to the absolute minimum needed to produce and test a working macOS x86-64 executable for that prints “Hello World” via a syscall. We have several short-term follow-ups planned to add important functionality, such as linking against archives, universal binaries, dylibs, and tbd files, performing subsection splitting (atomization), and producing dylibs. The follow-ups should give a good sense of the overall design while still keeping each piece easily reviewable and testable individually. Our end goal is to create a full-featured Mach-O linker, and we’ll be working toward that goal over the next several months (and years, in all likelihood). We’d appreciate feedback and reviews.
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200302/4a6ce0a0/attachment.html>

More information about the llvm-dev mailing list