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. Pierre -- 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
