A note on the binutils BOF

Martin Liška mliska@suse.cz
Thu Aug 27 07:46:20 GMT 2020


On 8/26/20 11:57 PM, Mark Wielaard wrote:
> Hi,
> 
> On Wed, Aug 26, 2020 at 01:54:19PM -0600, Tom Tromey wrote:
>> At the BOF, Nick asked if anyone uses gold as their normal linker.  I
>> do!  On my personal laptop, it is approximately 2x faster when linking
>> gdb.  This kind of timing is representative for my setup:
>>
>> BFD	0m13.188s
>> gold	0m6.635s
>>
>> I've saved tons of time over the years by making this switch.  IIRC the
>> difference was even more pronounced when I was working on Firefox.
> 
> As another random datapoint, on Fedora and RHEL like systems (and
> probably others) you can use update-alternatives --set ld
> /usr/bin/ld.gold to make gold the stadard linker.

Just a note, SUSE does the very same.

> It works just fine
> for my personal hacking and only noticed recently because I was
> looking into the interaction between gcc/as/ld. If there are
> bugs/issues in gold they seem to be hidden pretty well :)

I would like to point out that big project like Firefox, Chromium and
probably others do use ld.gold in their build system. And we build the
packages with ld.gold.

I noticed recently that ld.gold has threading capacity which is a nice
feature for large binaries. However, it does not interact well with LTO:
https://sourceware.org/bugzilla/show_bug.cgi?id=26200

Martin

> 
> Cheers,
> 
> Mark
> 



More information about the Binutils mailing list