1*a9fa9459Szrjgold is an ELF linker. It is intended to have complete support for 2*a9fa9459SzrjELF and to run as fast as possible on modern systems. For normal use 3*a9fa9459Szrjit is a drop-in replacement for the older GNU linker. 4*a9fa9459Szrj 5*a9fa9459Szrjgold is part of the GNU binutils. See ../binutils/README for more 6*a9fa9459Szrjgeneral notes, including where to send bug reports. 7*a9fa9459Szrj 8*a9fa9459Szrjgold was originally developed at Google, and was contributed to the 9*a9fa9459SzrjFree Software Foundation in March 2008. At Google it was designed by 10*a9fa9459SzrjIan Lance Taylor, with major contributions by Cary Coutant, Craig 11*a9fa9459SzrjSilverstein, and Andrew Chatham. 12*a9fa9459Szrj 13*a9fa9459SzrjThe existing GNU linker manual is intended to be accurate 14*a9fa9459Szrjdocumentation for features which gold supports. gold supports most of 15*a9fa9459Szrjthe features of the GNU linker for ELF targets. Notable 16*a9fa9459Szrjomissions--features of the GNU linker not currently supported in 17*a9fa9459Szrjgold--are: 18*a9fa9459Szrj * MRI compatible linker scripts 19*a9fa9459Szrj * cross-reference reports (--cref) 20*a9fa9459Szrj * various other minor options 21*a9fa9459Szrj 22*a9fa9459Szrj 23*a9fa9459SzrjNotes on the code 24*a9fa9459Szrj================= 25*a9fa9459Szrj 26*a9fa9459SzrjThese are some notes which may be helpful to people working on the 27*a9fa9459Szrjsource code of gold itself. 28*a9fa9459Szrj 29*a9fa9459Szrjgold is written in C++. It is a GNU program, and therefore follows 30*a9fa9459Szrjthe GNU formatting standards as modified for C++. Source documents in 31*a9fa9459Szrjorder of decreasing precedence: 32*a9fa9459Szrj http://www.gnu.org/prep/standards/ 33*a9fa9459Szrj http://gcc.gnu.org/onlinedocs/libstdc++/manual/source_code_style.html 34*a9fa9459Szrj http://www.zembu.com/eng/procs/c++style.html 35*a9fa9459Szrj 36*a9fa9459SzrjThe linker is intended to have complete support for cross-compilation, 37*a9fa9459Szrjwhile still supporting the normal case of native linking as fast as 38*a9fa9459Szrjpossible. In order to do this, many classes are actually templates 39*a9fa9459Szrjwhose parameter is the ELF file class (e.g., 32 bits or 64 bits). The 40*a9fa9459SzrjC++ code is the same, but we don't pay the execution time cost of 41*a9fa9459Szrjalways using 64-bit integers if the target is 32 bits. Many of these 42*a9fa9459Szrjclass templates also have an endianness parameter: true for 43*a9fa9459Szrjbig-endian, false for little-endian. 44*a9fa9459Szrj 45*a9fa9459SzrjThe linker is multi-threaded. The Task class represents a single unit 46*a9fa9459Szrjof work. Task objects are stored on a single Workqueue object. Tasks 47*a9fa9459Szrjcommunicate via Task_token objects. Task_token objects are only 48*a9fa9459Szrjmanipulated while holding the master Workqueue lock. Relatively few 49*a9fa9459Szrjmutexes are used. 50*a9fa9459Szrj 51*a9fa9459Szrj 52*a9fa9459SzrjBuild requirements 53*a9fa9459Szrj================== 54*a9fa9459Szrj 55*a9fa9459SzrjThe gold source code uses templates heavily. Building it requires a 56*a9fa9459Szrjrecent version of g++. g++ 4.0.3 and 4.1.3 are known to work. g++ 57*a9fa9459Szrj3.2, 3.4.3, and 4.1.2 are known to fail. 58*a9fa9459Szrj 59*a9fa9459SzrjThe linker script parser uses features which are only in newer 60*a9fa9459Szrjversions of bison. bison 2.3 is known to work. bison 1.26 is known 61*a9fa9459Szrjto fail. If you are building gold from an official binutils release, 62*a9fa9459Szrjthe bison output should already be included. 63*a9fa9459Szrj 64*a9fa9459Szrj 65*a9fa9459SzrjCopyright (C) 2012-2016 Free Software Foundation, Inc. 66*a9fa9459Szrj 67*a9fa9459SzrjCopying and distribution of this file, with or without modification, 68*a9fa9459Szrjare permitted in any medium without royalty provided the copyright 69*a9fa9459Szrjnotice and this notice are preserved. 70