On 2020-02-28 10:03 +0100, Pierre Labastie wrote: > Le 28/02/2020 à 09:53, Xi Ruoyao a écrit : > > On 2020-02-28 06:47 +0000, Fred Finster wrote: > > > I have not studied this ld-new linker. > > > > > > Is "ld-gold" a faster linker to use when building Linux from scratch ,. > > > Then > > > "ld-new" > > > > You are misinterpreting the book. It's ld.bfd versus ld.gold, not ld-new > > versus > > ld.gold. ld-new is a special ld.bfd instance prepared for "adjusting the > > toolchain". > > > > > What benefit is ld-new over using ld-gold to build Linux from scratch? > > > > It's the default. /usr/bin/ld is a hardlink to /usr/bin/ld.bfd on most > > Linux > > distros, instead of /usr/bin/ld.gold. > > > > > So should ld.new be replaced with ld.gold? > > > > If you mean "should we use ld.gold instead of ld.bfd", my answer is "your > > distro, your rules". But if you mean "ld-new", NO. If you want to use > > ld.gold > > you should also prepare something like "ld.gold-new" for "adjusting the > > toolchain". > > > > Also, do not forget that this "ld-new" is only used to build some packages in > chapter 6 : those between "adjusting the toolchain" and "binutils-2.34". Those > packages are small, so not likely that ld.gold would bring much. > > I think (not tried) you can remove "--enable-ld=default" from the configure > options in binutils chapter 6, if you want to use gold as the default linker. > > And to the question of whether it is faster, the answer is "no". It may build > faster programs, since optimization is better, but it spends more time > optimizing.
No. It's not an optimization, but a different linker. (Someone says) it runs faster than ld.bfd. But it does not build faster programs. -- Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
