Using gold as the default linker
Hi,
Has anyone here had success with using ld.gold? If yes, it'd be great if I could get a few pointers: 1. I primarily use the CLFS book to set-up an x86_64-64 build. Would I need to add gold support in the temporary toolchain as well? In chapter 10.18 of the book, I configured binutils with "--enable-gold" and it compiled fine. I linked /usr/bin/ld to ld.gold and proceeded to compile gcc. But I get this error: Code:
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../../x86_64-unknown-linux-gnu/bin/ld: /tmp/ccWICiMC.ltrans0.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `__do_global_dtors_aux' can not be used when making a shared object; recompile with -fPIC 2. Is it alright to use the LFS book instead of CLFS, for x86_64-64, when both host and target arch are the same? I ask this because I had been advised to use the CLFS book for 64-bit, supposedly because it produced a more stable build. Thanks in advance. :) |
tuxbg recompiles his slackware and uses ld gold.
There is some stuff you find find in this topic: http://www.linuxquestions.org/questi...648/page3.html Before trying LFS, I recbuild archlinux, slackware and created hybrids of slackware, 0linux, ... |
Hmmm...That looked to me like the stock slackbuild for binutils, only with the default linker switched to gold. My question, though, was whether I need to compile the temporary toolchain with support for gold as well. In the error code I cited above, the linker failed with a suggestion to compile with PIC, despite not having enabled -pie -fPIE or even partial relro.
|
Quote:
|
Ok, thank you for your input. I'll start an experimental setup over the weekend, first building a CLFS system with support for gold, and then building an LFS system with the CLFS build as the host. Will try out different things, especially some toolchain hardening with Gentoo's patches and see how that works out. I'll keep this post open until after a successful build. Thanks again.
|
All times are GMT -5. The time now is 04:54 PM. |