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.
 
 
 
 
 
 
Cary Coutant 6eeb0170bb Don't allow COPY relocations for protected symbols. 10 years ago
..
po Updated Chinese (simplified) translations for bfd, binutils and gold. 10 years ago
testsuite Don't allow COPY relocations for protected symbols. 10 years ago
ChangeLog Don't allow COPY relocations for protected symbols. 10 years ago
ChangeLog-0815 binutils ChangeLog rotation 11 years ago
Makefile.am Copyright update for binutils 11 years ago
Makefile.in Regenerate Makefile.in/aclocal.m4 automake 1.11.6 10 years ago
NEWS Copyright update for binutils 11 years ago
README Copyright update for binutils 11 years ago
TODO * TODO: New file. 19 years ago
aarch64-reloc-property.cc Copyright update for binutils 11 years ago
aarch64-reloc-property.h Copyright update for binutils 11 years ago
aarch64-reloc.def Fix for PR gold/19987. 10 years ago
aarch64.cc Fix for PR gold/19987. 10 years ago
aclocal.m4 Regenerate Makefile.in/aclocal.m4 automake 1.11.6 10 years ago
archive.cc Copyright update for binutils 11 years ago
archive.h Copyright update for binutils 11 years ago
arm-reloc-property.cc Copyright update for binutils 11 years ago
arm-reloc-property.h Copyright update for binutils 11 years ago
arm-reloc.def Copyright update for binutils 11 years ago
arm.cc Add unused attribute where necessary to quiet GCC 6 warnings. 11 years ago
attributes.cc Copyright update for binutils 11 years ago
attributes.h Copyright update for binutils 11 years ago
binary.cc Copyright update for binutils 11 years ago
binary.h Copyright update for binutils 11 years ago
common.cc Copyright update for binutils 11 years ago
common.h Copyright update for binutils 11 years ago
compressed_output.cc Copyright update for binutils 11 years ago
compressed_output.h Copyright update for binutils 11 years ago
config.in Regenerate configure in gold 12 years ago
configure Regenerate configure 10 years ago
configure.ac Copyright update for binutils 11 years ago
configure.tgt Copyright update for binutils 11 years ago
copy-relocs.cc Don't allow COPY relocations for protected symbols. 10 years ago
copy-relocs.h Don't allow COPY relocations for protected symbols. 10 years ago
cref.cc Copyright update for binutils 11 years ago
cref.h Copyright update for binutils 11 years ago
debug.h Copyright update for binutils 11 years ago
defstd.cc Copyright update for binutils 11 years ago
defstd.h Copyright update for binutils 11 years ago
descriptors.cc Copyright update for binutils 11 years ago
descriptors.h Copyright update for binutils 11 years ago
dirsearch.cc Add unused attribute where necessary to quiet GCC 6 warnings. 11 years ago
dirsearch.h Copyright update for binutils 11 years ago
dwarf_reader.cc Copyright update for binutils 11 years ago
dwarf_reader.h Copyright update for binutils 11 years ago
dwp.cc Copyright update for binutils 11 years ago
dwp.h Copyright update for binutils 11 years ago
dynobj.cc Copyright update for binutils 11 years ago
dynobj.h Copyright update for binutils 11 years ago
ehframe.cc Fix problem where gold cannot build .eh_frame_hdr from ld -r output. 11 years ago
ehframe.h Discard FDEs for zero-length address ranges. 11 years ago
errors.cc Fix problem where gold fails to issue an undefined symbol error during LTO. 11 years ago
errors.h Copyright update for binutils 11 years ago
expression.cc Copyright update for binutils 11 years ago
ffsll.c Copyright update for binutils 11 years ago
fileread.cc Copyright update for binutils 11 years ago
fileread.h Copyright update for binutils 11 years ago
freebsd.h Copyright update for binutils 11 years ago
ftruncate.c Copyright update for binutils 11 years ago
gc.cc Copyright update for binutils 11 years ago
gc.h Refactor gold to enable support for MIPS-64 relocation format. 11 years ago
gdb-index.cc Copyright update for binutils 11 years ago
gdb-index.h Copyright update for binutils 11 years ago
gold-threads.cc Copyright update for binutils 11 years ago
gold-threads.h Copyright update for binutils 11 years ago
gold.cc Copyright update for binutils 11 years ago
gold.h Copyright update for binutils 11 years ago
i386.cc Fix failure to diagnose GOTOFF relocation to undef symbol in shared lib (i386). 11 years ago
icf.cc 2016-02-05 Sriraman Tallam <tmsriram@google.com> 11 years ago
icf.h Copyright update for binutils 11 years ago
incremental-dump.cc Copyright update for binutils 11 years ago
incremental.cc Copyright update for binutils 11 years ago
incremental.h Copyright update for binutils 11 years ago
int_encoding.cc Copyright update for binutils 11 years ago
int_encoding.h Copyright update for binutils 11 years ago
layout.cc Add support for STT_SPARC_REGISTER symbols. 11 years ago
layout.h Add support for STT_SPARC_REGISTER symbols. 11 years ago
main.cc Copyright update for binutils 11 years ago
mapfile.cc Copyright update for binutils 11 years ago
mapfile.h Copyright update for binutils 11 years ago
merge.cc Copyright update for binutils 11 years ago
merge.h Copyright update for binutils 11 years ago
mips.cc Don't allow COPY relocations for protected symbols. 10 years ago
mremap.c Copyright update for binutils 11 years ago
nacl.cc Copyright update for binutils 11 years ago
nacl.h Copyright update for binutils 11 years ago
object.cc Copyright update for binutils 11 years ago
object.h Refactor gold to enable support for MIPS-64 relocation format. 11 years ago
options.cc Copyright update for binutils 11 years ago
options.h Copyright update for binutils 11 years ago
output.cc Refactor Output_data_reloc_base::do_write for MIPS-specific relocs. 11 years ago
output.h Refactor Output_data_reloc_base::do_write for MIPS-specific relocs. 11 years ago
parameters.cc Copyright update for binutils 11 years ago
parameters.h Copyright update for binutils 11 years ago
plugin.cc Don't handle every plugin symbol as defined. 11 years ago
plugin.h Copyright update for binutils 11 years ago
powerpc.cc Fix "PowerPC64 ELFv2 entry code" for big-endian 11 years ago
pread.c Copyright update for binutils 11 years ago
readsyms.cc Copyright update for binutils 11 years ago
readsyms.h Copyright update for binutils 11 years ago
reduced_debug_output.cc Copyright update for binutils 11 years ago
reduced_debug_output.h Copyright update for binutils 11 years ago
reloc-types.h Refactor gold to enable support for MIPS-64 relocation format. 11 years ago
reloc.cc gold: Add view and view_size parameters to is_call_to_non_split. 11 years ago
reloc.h Fix compile errors about shift counts too large. 11 years ago
resolve.cc Copyright update for binutils 11 years ago
s390.cc gold: Add s390 -fsplit-stack support. 11 years ago
script-c.h Copyright update for binutils 11 years ago
script-sections.cc Copyright update for binutils 11 years ago
script-sections.h Copyright update for binutils 11 years ago
script.cc Copyright update for binutils 11 years ago
script.h Copyright update for binutils 11 years ago
sparc.cc Add support for STT_SPARC_REGISTER symbols. 11 years ago
stringpool.cc Copyright update for binutils 11 years ago
stringpool.h Copyright update for binutils 11 years ago
symtab.cc Don't allow COPY relocations for protected symbols. 10 years ago
symtab.h Don't allow COPY relocations for protected symbols. 10 years ago
system.h Copyright update for binutils 11 years ago
target-reloc.h Fix problem where gold fails to issue an undefined symbol error during LTO. 11 years ago
target-select.cc Copyright update for binutils 11 years ago
target-select.h Copyright update for binutils 11 years ago
target.cc gold: Add view and view_size parameters to is_call_to_non_split. 11 years ago
target.h Add support for STT_SPARC_REGISTER symbols. 11 years ago
tilegx.cc Refactor gold to enable support for MIPS-64 relocation format. 11 years ago
timer.cc Copyright update for binutils 11 years ago
timer.h Copyright update for binutils 11 years ago
tls.h Copyright update for binutils 11 years ago
token.h Copyright update for binutils 11 years ago
version.cc Copyright update for binutils 11 years ago
workqueue-internal.h Copyright update for binutils 11 years ago
workqueue-threads.cc Copyright update for binutils 11 years ago
workqueue.cc Copyright update for binutils 11 years ago
workqueue.h Copyright update for binutils 11 years ago
x86_64.cc Add additional information to relocation overflow errors. 11 years ago
yyscript.y Copyright update for binutils 11 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++/manual/source_code_style.html
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.


Copyright (C) 2012-2016 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.