README 2.8 KB

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