1gold is an ELF linker. It is intended to have complete support for 2ELF and to run as fast as possible on modern systems. For normal use 3it is a drop-in replacement for the older GNU linker. 4 5gold is part of the GNU binutils. See ../binutils/README for more 6general notes, including where to send bug reports. 7 8gold was originally developed at Google, and was contributed to the 9Free Software Foundation in March 2008. At Google it was designed by 10Ian Lance Taylor, with major contributions by Cary Coutant, Craig 11Silverstein, and Andrew Chatham. 12 13The existing GNU linker manual is intended to be accurate 14documentation for features which gold supports. gold supports most of 15the features of the GNU linker for ELF targets. Notable 16omissions--features of the GNU linker not currently supported in 17gold--are: 18 * MEMORY regions in linker scripts 19 * MRI compatible linker scripts 20 * linker map files (-M, -Map) 21 * cross-reference reports (--cref) 22 * linker garbage collection (--gc-sections) 23 * position independent executables (-pie) 24 * various other minor options 25 26 27Notes on the code 28================= 29 30These are some notes which may be helpful to people working on the 31source code of gold itself. 32 33gold is written in C++. It is a GNU program, and therefore follows 34the GNU formatting standards as modified for C++. Source documents in 35order of decreasing precedence: 36 http://www.gnu.org/prep/standards/ 37 http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE 38 http://www.zembu.com/eng/procs/c++style.html 39 40The linker is intended to have complete support for cross-compilation, 41while still supporting the normal case of native linking as fast as 42possible. In order to do this, many classes are actually templates 43whose parameter is the ELF file class (e.g., 32 bits or 64 bits). The 44C++ code is the same, but we don't pay the execution time cost of 45always using 64-bit integers if the target is 32 bits. Many of these 46class templates also have an endianness parameter: true for 47big-endian, false for little-endian. 48 49The linker is multi-threaded. The Task class represents a single unit 50of work. Task objects are stored on a single Workqueue object. Tasks 51communicate via Task_token objects. Task_token objects are only 52manipulated while holding the master Workqueue lock. Relatively few 53mutexes are used. 54