gold is a new linker intended as a replacement for the ld.bfd linker.
The two installed linkers are available directly as ld.bfd and ld.gold respectively. Additionally, the default linker is also installed as ld -- and this binary is used by compilers.
Switching the default linker
The gold linker was known to cause breakage of grub2, causing the system to become unbootable. Proceed with caution.
The easy way
Emerge >=sys-devel/binutils-config-3 and set default linker to gold:
binutils-config --linker ld.gold
* Setting default linker to ld.gold for x86_64-pc-linux-gnu-2.22 ... [ ok ]
The hard way (manually)
The default linker can be changed immediately by linking ld to ld.gold in the binutils directory.
readlink -f /usr/bin/ld
ln -f /usr/x86_64-pc-linux-gnu/binutils-bin/2.22/ld.gold /usr/x86_64-pc-linux-gnu/binutils-bin/2.22/ld
ln -sf ld.gold /usr/x86_64-pc-linux-gnu/binutils-bin/2.22/ld
To make the change persistent across re-installations of binutils, one should pass a flag to the binutils configure script. This can be done using the EXTRA_ECONF variable in a package.env configuration.
File/etc/portage/env/gold.confEnvironment overrides to enable gold by default
File/etc/portage/package.envEnabling gold.conf override for binutils