The gold linker is now in the base system

John Marino dragonflybsd at marino.st
Tue May 17 23:29:47 PDT 2011


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/ld.gold .

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 
/usr/libexec/binutils221/ld.bfd

Gold will NOT build a usable kernel or world.  The only way to attempt 
this is to modify to the ld.bfd and ld.gold 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





More information about the Users mailing list