From owner-freebsd-toolchain@FreeBSD.ORG Sun Jul 29 09:02:10 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80F3B106566B; Sun, 29 Jul 2012 09:02:10 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5F18FC18; Sun, 29 Jul 2012 09:02:10 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q6T91xtD054576 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 29 Jul 2012 09:02:01 GMT (envelope-from theraven@freebsd.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> Date: Sun, 29 Jul 2012 10:01:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1343484950.37325.YahooMailNeo@web113506.mail.gq1.yahoo.com> To: Pedro Giffuni X-Mailer: Apple Mail (2.1278) Cc: "freebsd-toolchain@freebsd.org" Subject: Re: BSD ld (was Re: MCLinker and llvm-config) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 09:02:10 -0000 On 28 Jul 2012, at 15:15, Pedro Giffuni wrote: > The Elftoolchain project has been developing a BSD ld: >=20 > http://sourceforge.net/apps/trac/elftoolchain/=20 >=20 >=20 > http://sourceforge.net/apps/trac/elftoolchain/browser/trunk/ld=20 >=20 >=20 > I thought that would be the official FreeBSD implementation. There is not yet any consensus as to which linker will be the = replacement, nor on whether the replacement in 10.0 will be the one that = we use long-term. The requirements for 10.0 are, I believe: - Actually exists - Capable of linking base on all tier 1 platforms (which, in 10.0, = hopefully will include ARMv7) - Cross-linking support (ideally without having to build multiple = versions of the linker binary) - Permissive license The longer-term requirements are: - Good integration with the rest of the toolchain, including - LTO support - Code reuse - Ability to link all (or, at least initially, most) ports - Easy to add support for new architectures - Active upstream community - Good performance (both in terms of linkage speed and generated = binaries) Unfortunately, in general the ELF toolchain project is duplicating a lot = of the work done in LLVM and not in an especially reusable way. For = example, when you add a compiler back end in LLVM you get a disassembler = for free and an assembler with a small amount of effort, which means = that an LLVM-based objdump and as will share code with the compiler, = meaning better testing and few places for bugs to hide. It also means = that when we get compiler support for a new platform from the compiler, = we get those tools for free. For example, llvm-objdump can disassemble = the CHERI variant of the MIPS instruction set correctly (including = identifying relocation types), but no other objdump can, and this did = not require any objdump-specific code to be written. =20 The linker's ELF generation support is similarly overlapping with that = of the compiler, and I would much rather that we have a single = implementation in the base system than two.=20 David=