Gold

gold is a new linker intended as a replacement for the ld.bfd linker.

Installing gold on Gentoo
In order to have gold installed, an EXTRA_ECONF override has to be set for.

If you'd like gold to be default linker (ld), you can use instead:

After any of the above, enable it for the binutils package using package.env:

Rebuild :

Switching the default linker
The two installed linkers are available directly as ld.bfd and ld.gold respectively. Additionally, the default compiler is also installed as ld -- and this binary is used by compilers.

The default compiler can be changed either by changing the build arguments as pointed out above and rebuilding binutils, or through replacing the ld executable. In order to do that, first locate the actual binutils install directory:

Now replace ld in that directory by the symlink of choice:

Note that for the first argument, path relative to the final directory should be used -- so it should either state ld.gold or ld.bfd.