本文介绍了lld链接器是否可以替代ld和gold?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

LLVM项目中的链接器 lld当前是在开发中,并且每周都在增加新功能.它的开发人员保证lldld更快.与gold相比,它如何竞争?

The linker from the LLVM project lld is currently developed with new features added week by week. Its developers promise that lld is faster than ld. How does it compete compared to gold?

是否可以直接替换ld?有了黄金,有些圈子就可以跳过.

Is lld a drop-in replacement for ld? With gold there are some hoops to jump through.

推荐答案

其中一位LLD开发人员Uiyama Rui回顾了LLD在2016年取得的进展,请参见 http://lists.llvm.org/pipermail/llvm-dev/2016-December/107981.html .

One of the LLD developers, Rui Ueyama, looks back at the progress LLD did in 2016, see http://lists.llvm.org/pipermail/llvm-dev/2016-December/107981.html.

  • 现在,我非常确定[LLD]将是对现有GNU链接器[..]的一种严肃(而且更好的选择)."
  • "LLD现在能够链接大多数x86-64用户区程序."
  • "FreeBSD项目和我们正在尝试使LLD成为操作系统的系统默认链接器,除了一些棘手的程序(例如内核或引导加载程序)之外,该链接器通常都能正常工作." 已实现!
  • "LLD支持x86,x86-64,x32,AArch64,AMDGPU,ARM,PPC64和MIPS32/64,尽管完整性会有所不同."
  • "[T]这里已经有一些使用LLD作为系统的系统链接程序,例如CloudABI或Fuchsia. Chromium和Clang/LLVM本身具有构建选项以使用LLD来构建它们."
  • "Now I'm pretty sure that that [LLD] is going to be a serious (and better, in my opinion) alternative to the existing GNU linkers [..]."
  • "LLD is now able to link most x86-64 userland programs."
  • "The FreeBSD project and we are trying to make LLD the system default linker of the operating system, and except a few tricky programs such as the kernel or a bootloader, the linker works mostly fine." Already achieved!
  • "LLD supports x86, x86-64, x32, AArch64, AMDGPU, ARM, PPC64 and MIPS32/64,though completeness varies."
  • "[T]here are already a few systems that are using LLD as systemlinkers, such as CloudABI or Fuchsia. Chromium and Clang/LLVM itself hasbuild options to use LLD to build them."

而且,作为奖励:

  • "LLD变得更快[..]今年年初,LLD花费了大约16秒的时间来生成1.5 GB的clang(调试版本)可执行文件.现在,单核大约需要14.5秒,而8.5秒在20个核心上. ld.gold大约需要25秒和20秒,分别. [..]如果您有链接时间过长的问题,建议您尝试LLD."
  • "LLD got faster [..] At the beginning of this year,LLD took about 16 seconds to produce a 1.5 GB clang (debug build)executable. Now, it takes about 14.5 seconds on single core and 8.5 secondson 20 cores. ld.gold takes about 25 seconds and 20 seconds,respectively. [..] If you have a problem of too long link time, I'd recommend to try LLD."

2017年春季更新,据一位开发人员称:"LLD/ELF现在已经准备好用于x86-64(可能还有AArch64和MIPS)的生产环境.",请参阅 http://lists.llvm.org/pipermail/llvm-dev/2017- March/111083.html 它还简要介绍了如何使用LLD.

Update spring 2017 According to one of the developers "LLD/ELF is now ready for production use at least for x86-64 (and probably for AArch64 and MIPS).", see http://lists.llvm.org/pipermail/llvm-dev/2017-March/111083.htmlIt also contains a brief description on how to make use of LLD.

这篇关于lld链接器是否可以替代ld和gold?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-19 01:07