gold – The GNU ELF linker

In software engineering, gold is a linker for ELF files. It became an official GNU package and
was added to binutils in March 2008[1] [2] and first released in binutils version 2.19. gold
was developed by Ian Lance Taylor and a small team at Google.[3] The motivation for writing
gold was to make a linker that is faster than the GNU linker,[3] especially for large
applications coded in C++. 

[bash]
$gcc -fuse-ld=gold hello.c
$./a.out
hello world
$./a.out
hello world
$./a.out
hello world
$./a.out
hello world
$time ./a.out
hello world

real 0m0.002s
user 0m0.002s
sys 0m0.001s
$gcc hello.c
$time ./a.out
hello world

real 0m0.002s
user 0m0.000s
sys 0m0.002s
$gcc -fuse-ld=gol hello.c
gcc: error: unrecognized command line option ‘-fuse-ld=gol’; did you mean ‘-fuse-ld=gold’?
$

[/bash]
LINKS
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
https://stackoverflow.com/questions/3476093/replacing-ld-with-gold-any-experience
https://en.wikipedia.org/wiki/Gold_(linker)

One thought on “gold – The GNU ELF linker”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s