The gold linker is now in the base system

Sascha Wildner saw at
Wed May 18 05:44:59 PDT 2011

On Wed, 18 May 2011 08:26:09 +0200, John Marino <dragonflybsd at>  

Today I flipped a switch a switch which allows the gold linker to be  
built with world.  After the next build, you'll find it located at  
/usr/libexec/binutils221/elf/ .

It is considered experimental at this point.  Users of large C++  
projects should see a large jump in compiling speed when using gold  
(could be up to 5x faster), so if you are a frequent builder of such a  
project, you might be interested to switch linkers.

For additional information:
/usr/bin/ld is objformat-linked to /usr/libexec/binutils221/elf/ld
/usr/libexec/binutils221/elf/ld is hardlinked to  

Gold will NOT build a usable kernel or world.  The only way to attempt  
this is to modify to the ld.bfd and makefiles, so you luckily  
can't do this accidentally.  Therefore, you should be safe if you decide  
to change the /usr/libexec/binutils221/elf/ld hardlink to gold.

It would be great to hear about successes and failures encountered with  
the use of the gold linker.

-- John

it seems to be only rtld-elf that has an issue when linked with gold  
(somewhere in rtld_start.S).

A gold linked chroot works fine (meaning, I can buildworld again  
successfully in it) when I replace its with one that is not  
linked with gold.


More information about the Users mailing list