You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
H.J. Lu fd885f3a4d Handle R_X86_64_64 properly for x32 14 years ago
..
po * po/it.po: New Italian translation. 15 years ago
testsuite * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
ChangeLog Handle R_X86_64_64 properly for x32 14 years ago
Makefile.am * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
Makefile.in * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
NEWS * NEWS: New file. 18 years ago
README * README: Update compilers known to work and fail. 16 years ago
TODO * TODO: New file. 18 years ago
aclocal.m4 * configure.in (AC_CHECK_FUNCS): Add setlocale. 14 years ago
archive.cc * archive.cc (Library_base::should_include_member): Check for 14 years ago
archive.h PR gold/12163 15 years ago
arm-reloc-property.cc Fix typos in gold. 16 years ago
arm-reloc-property.h Fix typos in gold. 16 years ago
arm-reloc.def Fix typos in gold. 16 years ago
arm.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
attributes.cc * archive.cc: Formatting fixes: Remove whitespace between 16 years ago
attributes.h Fix typos in gold. 16 years ago
binary.cc * binary.cc (Binary_to_elf::sized_convert): Don't crash if the 15 years ago
binary.h Add support for --format binary for input files. 18 years ago
common.cc * common.cc (Symbol_table::do_allocate_commons_list): Call 15 years ago
common.h * gold.cc (queue_middle_gc_tasks): Use a separate blocker for each 16 years ago
compressed_output.cc * compressed_output.cc (zlib_decompress): Fix signature in 16 years ago
compressed_output.h * compressed_output.cc (zlib_decompress): New function. 16 years ago
config.in binutils/ 14 years ago
configure binutils/ 14 years ago
configure.ac binutils/ 14 years ago
configure.tgt 2010-02-02 Doug Kwan <dougkwan@google.com> 16 years ago
copy-relocs.cc * object.h (Relobj::local_symbol_value): New function. 15 years ago
copy-relocs.h * copy-relocs.cc (Copy_relocs::copy_reloc): Call make_copy_reloc 15 years ago
cref.cc Fix typos in gold. 16 years ago
cref.h PR 10980 16 years ago
debug.h * debug.h (DEBUG_INCREMENTAL): New flag. 16 years ago
defstd.cc PR 10893 16 years ago
defstd.h Update copyright years. Update language files. 18 years ago
descriptors.cc * descriptors.cc (set_close_on_exec): New function. 15 years ago
descriptors.h 2009-03-23 Ian Lance Taylor <iant@google.com> 17 years ago
dirsearch.cc 2011-11-17 Sterling Augustine <saugustine@google.com> 15 years ago
dirsearch.h 2011-11-17 Sterling Augustine <saugustine@google.com> 15 years ago
dwarf_reader.cc elfcpp/ 14 years ago
dwarf_reader.h gold: Handle DW_AT_high_pc as offset from DW_AT_low_pc in gdb-index.cc. 14 years ago
dynobj.cc PR gold/12525 15 years ago
dynobj.h 2012-03-21 Cary Coutant <ccoutant@google.com> 14 years ago
ehframe.cc PR gold/12525 15 years ago
ehframe.h PR gold/12571 15 years ago
errors.cc * common.cc (Symbol_table::do_allocate_commons_list): Call 15 years ago
errors.h * common.cc (Symbol_table::do_allocate_commons_list): Call 15 years ago
expression.cc * object.h (Relobj::local_symbol_value): New function. 15 years ago
ffsll.c * ffsll.c (ffsll): Correct implementation. 17 years ago
fileread.cc PR gold/13288 15 years ago
fileread.h * archive.cc (Archive::include_member): Adjust call to 15 years ago
freebsd.h * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
ftruncate.c * ffsll.c: New file. 17 years ago
gc.cc 2009-01-20 Sriraman Tallam <tmsriram@google.com> 17 years ago
gc.h * arm.cc (Target_arm::do_is_defined_by_abi): Make sym a const 14 years ago
gdb-index.cc gold: Handle DW_AT_high_pc as offset from DW_AT_low_pc in gdb-index.cc. 14 years ago
gdb-index.h 2012-03-21 Cary Coutant <ccoutant@google.com> 14 years ago
gold-threads.cc Fix typos in gold. 16 years ago
gold-threads.h 2010-02-22 Doug Kwan <dougkwan@google.com> 16 years ago
gold.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
gold.h * common.cc (Symbol_table::do_allocate_commons_list): Call 15 years ago
i386.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
icf.cc * target.h (Target::can_check_for_function_pointers): Rewrite. 15 years ago
icf.h 2011-02-02 Sriraman Tallam <tmsriram@google.com> 15 years ago
incremental-dump.cc * incremental-dump.cc (find_input_containing_global): Replace 14 years ago
incremental.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
incremental.h * incremental-dump.cc (find_input_containing_global): Replace 14 years ago
int_encoding.cc * int_encoding.cc (read_unsigned_LEB_128): Replaced with inline 14 years ago
int_encoding.h * int_encoding.cc (read_unsigned_LEB_128): Replaced with inline 14 years ago
layout.cc gold/ 14 years ago
layout.h * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
main.cc 2012-03-21 Cary Coutant <ccoutant@google.com> 14 years ago
mapfile.cc * incremental-dump.cc (dump_incremental_inputs): Print dynamic reloc 15 years ago
mapfile.h * incremental-dump.cc (dump_incremental_inputs): Print dynamic reloc 15 years ago
merge.cc * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info): 14 years ago
merge.h Fix typos in gold. 16 years ago
mremap.c * configure.ac: Check for sys/mman.h and mmap. Check for mremap 15 years ago
nacl.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
nacl.h * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
object.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
object.h * arm.cc (Target_arm::do_is_defined_by_abi): Make sym a const 14 years ago
options.cc * options.cc (General_options::finalize): Disallow -pie and -static. 14 years ago
options.h * archive.cc (Library_base::should_include_member): Check for 14 years ago
output.cc gold: Allow use_plt_offset to be specified for global relocations. 14 years ago
output.h gold: Allow use_plt_offset to be specified for global relocations. 14 years ago
parameters.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
parameters.h * gold.cc: Include timer.h. 15 years ago
plugin.cc 2012-03-21 Cary Coutant <ccoutant@google.com> 14 years ago
plugin.h 2012-03-21 Cary Coutant <ccoutant@google.com> 14 years ago
powerpc.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
pread.c * pread.c: Include stdio.h. 17 years ago
readsyms.cc * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info): 14 years ago
readsyms.h * archive.cc (Archive::include_member): Adjust call to 15 years ago
reduced_debug_output.cc elfcpp/ 14 years ago
reduced_debug_output.h Revert -Wshadow changes, all changes from: 17 years ago
reloc-types.h * copy-relocs.cc: New file. 18 years ago
reloc.cc * layout.cc: Include "object.h". 15 years ago
reloc.h * arm.cc (Target_arm::do_is_defined_by_abi): Make sym a const 14 years ago
resolve.cc * resolve.cc (Symbol_table::resolve): When merging common symbols, 14 years ago
script-c.h * README: Remove claim that MEMORY is not supported. 16 years ago
script-sections.cc PR gold/13023 15 years ago
script-sections.h * script-sections.h (class Script_sections): Make 16 years ago
script.cc 2011-11-17 Sterling Augustine <saugustine@google.com> 15 years ago
script.h PR gold/13023 15 years ago
sparc.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
stringpool.cc * archive.cc: Formatting fixes: Remove whitespace between 16 years ago
stringpool.h * symtab.cc (Symbol::versioned_name): New function. 15 years ago
symtab.cc * archive.cc (Library_base::should_include_member): Check for 14 years ago
symtab.h 2011-10-31 Sriraman Tallam <tmsriram@google.com> 15 years ago
target-reloc.h Replace <64, false> with <size, big_endian> 15 years ago
target-select.cc * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
target-select.h * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
target.cc gold: Fix parameterization of do_adjust_elf_header 14 years ago
target.h * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. 14 years ago
timer.cc * timer.cc: #include <unistd.h>. 14 years ago
timer.h * gold.cc: Include timer.h. 15 years ago
tls.h Update copyright years. Update language files. 18 years ago
token.h * dirsearch.cc (Dirsearch::initialize): Add all blockers before 16 years ago
version.cc * version.cc (version_string): Bump to 1.11. 15 years ago
workqueue-internal.h * workqueue-internal.h (Workqueue_threader::should_cancel_thread): 15 years ago
workqueue-threads.cc * workqueue-internal.h (Workqueue_threader::should_cancel_thread): 15 years ago
workqueue.cc * workqueue-internal.h (Workqueue_threader::should_cancel_thread): 15 years ago
workqueue.h * workqueue-internal.h (Workqueue_threader::should_cancel_thread): 15 years ago
x86_64.cc Handle R_X86_64_64 properly for x32 14 years ago
yyscript.y 2011-11-11 Sterling Augustine <saugustine@google.com> 15 years ago

README

gold is an ELF linker.  It is intended to have complete support for
ELF and to run as fast as possible on modern systems. For normal use
it is a drop-in replacement for the older GNU linker.

gold is part of the GNU binutils. See ../binutils/README for more
general notes, including where to send bug reports.

gold was originally developed at Google, and was contributed to the
Free Software Foundation in March 2008. At Google it was designed by
Ian Lance Taylor, with major contributions by Cary Coutant, Craig
Silverstein, and Andrew Chatham.

The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports most of
the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are:
* MRI compatible linker scripts
* cross-reference reports (--cref)
* various other minor options


Notes on the code
=================

These are some notes which may be helpful to people working on the
source code of gold itself.

gold is written in C++. It is a GNU program, and therefore follows
the GNU formatting standards as modified for C++. Source documents in
order of decreasing precedence:
http://www.gnu.org/prep/standards/
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE
http://www.zembu.com/eng/procs/c++style.html

The linker is intended to have complete support for cross-compilation,
while still supporting the normal case of native linking as fast as
possible. In order to do this, many classes are actually templates
whose parameter is the ELF file class (e.g., 32 bits or 64 bits). The
C++ code is the same, but we don't pay the execution time cost of
always using 64-bit integers if the target is 32 bits. Many of these
class templates also have an endianness parameter: true for
big-endian, false for little-endian.

The linker is multi-threaded. The Task class represents a single unit
of work. Task objects are stored on a single Workqueue object. Tasks
communicate via Task_token objects. Task_token objects are only
manipulated while holding the master Workqueue lock. Relatively few
mutexes are used.


Build requirements
==================

The gold source code uses templates heavily. Building it requires a
recent version of g++. g++ 4.0.3 and 4.1.3 are known to work. g++
3.2, 3.4.3, and 4.1.2 are known to fail.

The linker script parser uses features which are only in newer
versions of bison. bison 2.3 is known to work. bison 1.26 is known
to fail. If you are building gold from an official binutils release,
the bison output should already be included.