From Gentoo Wiki
Jump to:navigation Jump to:search

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 respectively. Additionally, the default linker is also installed as ld - and this binary is used by compilers.


Gold can be enabled by setting the gold USE flag for sys-devel/binutils. Additionally, setting default-gold will make the default linker.

FILE /etc/portage/package.use/gold
# enable gold and set it as default
sys-devel/binutils      gold default-gold

After setting the USE flags, re-install binutils:

root #emerge --ask --changed-use --deep --oneshot --verbose sys-devel/binutils