Gold (linker)

gold

Developer(s)| Ian Lance Taylor
Written in| C++
Operating system| GNU
Platform| x86, x86-64, ARM, PowerPC, TileGX
Type| Linker
License| GNU General Public License version 3
Website| sourceware.org/binutils/

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++.

Unlike the GNU linker, gold does not use the BFD library to process object files. While this limits the object file formats it can process to ELF only, it is also claimed to result in a cleaner and faster implementation without an additional abstraction layer. The author cited complete removal of BFD as a reason to create a new linker from scratch rather than incrementally improve the GNU linker.[4] This rewrite also fixes some bugs in old ld that break ELF files in various minor ways.[5]

To specify gold in a makefile, one sets the LD or LD environment variable to `ld.gold`. To specify `gold` through a compiler option, one can use the gcc option `-fuse-ld=gold`.

Fedora has moved gold from binutils into its own package due to concerns it is suffering from bitrot after Google's interest has moved to LLVM.[6]

## See also

* Comparison of executable file formats, also for PE/COFF (Windows), and Mach-O (Mac OS X) formats.

## References

1. ↑ "gold README: Rewrite, with some notes on unsupported features.". 2008-03-25. https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gold/README;hb=874c5b289fe4dbacaf9679fb8331c6b7e39ea269. "It is a GNU program, and therefore follows the GNU formatting standards[...]"
2. ↑ Ian Lance Taylor (2008-03-22). "New ELF linker code added to GNU binutils". binutils mailing list. https://sourceware.org/pipermail/binutils/2008-March/055660.html.
3. ↑ 3.0 3.1 Ian Lance Taylor (2008-04-04). "gold: Google Releases New and Improved GCC Linker". Google Open Source Blog. https://opensource.googleblog.com/2008/04/gold-google-releases-new-and-improved.html.
4. ↑ Ian Lance Taylor (2008). "A New ELF Linker". GCC Developers' Summit. pp. 129–136. https://research.google/pubs/pub34417/. Retrieved 2020-04-28.
5. ↑ "ElflintGNU". https://sourceware.org/elfutils/ElflintGNU. "eu-elflint has a flag '--gnu-ld' described as "Binary has been created with GNU ld and is therefore known to be broken in certain ways". Note that by GNU ld the original GNU binutils ld is meant, not the newer GNU binutils gold linker."
6. ↑ Michael Larabel (2019-02-24). "GNU's Gold Linker Is Stagnating, Fedora Looking To Punt It Off Into A Separate Package". https://www.phoronix.com/scan.php?page=news_item&px=GNU-Gold-Stagnate-F31.

## External links

* Ian Lance Taylor (2007-08-22). "Linkers part 1". https://www.airs.com/blog/archives/38.
* Edge, Jake (2008-03-26). "Striking gold in binutils". LWN.net. https://lwn.net/Articles/274859/.
* "The LLVM gold plugin". LLVM. https://llvm.org/docs/GoldPlugin.html.
* Coutant, Cary (2012-04-05). "Incremental Linking with Gold". Linux Foundation Collaboration Summit. https://events.static.linuxfound.org/images/stories/pdf/lfcs2012_ccoutant.pdf.
* "Incremental Linking with Gold". 2012 Linux Foundation Collaboration Summit. 2012-04-11. https://linuxfoundation.ubicast.tv/videos/incremental-linking-with-gold/.

* v
* t
* e

GNU Project

History|

* GNU Manifesto
* Free Software Foundation
* Europe
* India
* Latin America
* History of free software

Licenses|

* GNU General Public License
* linking exception
* font exception
* GNU Lesser General Public License
* GNU Affero General Public License
* GNU Free Documentation License

Software|

* GNU (variants)
* Hurd
* Linux-libre
* glibc
* Bash
* coreutils
* findutils
* Build System
* GCC
* binutils
* GDB
* GRUB
* GNOME
* GNUstep
* GIMP
* Jami
* GNU Emacs
* GNU TeXmacs
* GNU Octave
* GNU R
* GSL
* GMP
* GNU Electric
* GNU Archimedes
* GNUnet
* GNU Privacy Guard
* Gnuzilla (IceCat)
* GNU Health
* GNUmed
* GNU LilyPond
* GNU Go
* GNU Chess
* Gnash
* Guix
* Guix System Distribution
* more...

Public
speakers|

* Alexandre Oliva
* Benjamin Mako Hill
* Bradley M. Kuhn
* Federico Heinz
* Frédéric Couchet
* Georg C. F. Greve
* John Sullivan
* José E. Marchesi
* Joshua Gay
* Kefah T. Issa
* Loïc Dachary
* Nagarjuna G.
* Peter Heath
* Richard M. Stallman

Other topics|

* GNU/Linux naming controversy
* Revolution OS
* Free Software Foundation anti-Windows campaigns
* Defective by Design

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Gold (linker). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Gold_(linker)&oldid=681945"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template