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.
 
 
 
 
 
 
Alan Modra c25aa1e114 [GOLD] two more fall-through comments 10 years ago
..
po Updated Chinese (simplified) translations for bfd, binutils and gold. 10 years ago
testsuite When building target binaries, ensure that the warning flags selected for the command line match the target compiler. 10 years ago
ChangeLog [GOLD] two more fall-through comments 10 years ago
ChangeLog-0815 binutils ChangeLog rotation 10 years ago
Makefile.am Copyright update for binutils 10 years ago
Makefile.in When building target binaries, ensure that the warning flags selected for the command line match the target compiler. 10 years ago
NEWS gold: Add a linker configure option --enable-relro 10 years ago
README Copyright update for binutils 10 years ago
TODO * TODO: New file. 18 years ago
aarch64-reloc-property.cc [Gold, aarch64] Implement some AArch64 relocs. 10 years ago
aarch64-reloc-property.h Copyright update for binutils 10 years ago
aarch64-reloc.def [Gold, aarch64] Implement some AArch64 relocs. 10 years ago
aarch64.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
aclocal.m4 Regenerate Makefile.in/aclocal.m4 automake 1.11.6 10 years ago
archive.cc Copyright update for binutils 10 years ago
archive.h Copyright update for binutils 10 years ago
arm-reloc-property.cc Copyright update for binutils 10 years ago
arm-reloc-property.h Copyright update for binutils 10 years ago
arm-reloc.def Copyright update for binutils 10 years ago
arm.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
attributes.cc Copyright update for binutils 10 years ago
attributes.h Copyright update for binutils 10 years ago
binary.cc Copyright update for binutils 10 years ago
binary.h Copyright update for binutils 10 years ago
common.cc Copyright update for binutils 10 years ago
common.h Copyright update for binutils 10 years ago
compressed_output.cc Copyright update for binutils 10 years ago
compressed_output.h Copyright update for binutils 10 years ago
config.in gold: Add a linker configure option --enable-relro 10 years ago
configure When building target binaries, ensure that the warning flags selected for the command line match the target compiler. 10 years ago
configure.ac gold: Support x86-64 TLS code sequences without PLT 10 years ago
configure.tgt Copyright update for binutils 10 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 10 years ago
cref.h Copyright update for binutils 10 years ago
debug.h [GOLD] Add debug output for powerpc section grouping 10 years ago
defstd.cc Copyright update for binutils 10 years ago
defstd.h Copyright update for binutils 10 years ago
descriptors.cc Copyright update for binutils 10 years ago
descriptors.h Copyright update for binutils 10 years ago
dirsearch.cc Add unused attribute where necessary to quiet GCC 6 warnings. 10 years ago
dirsearch.h Copyright update for binutils 10 years ago
dwarf_reader.cc Copyright update for binutils 10 years ago
dwarf_reader.h Copyright update for binutils 10 years ago
dwp.cc Copyright update for binutils 10 years ago
dwp.h Copyright update for binutils 10 years ago
dynobj.cc Copyright update for binutils 10 years ago
dynobj.h Copyright update for binutils 10 years ago
ehframe.cc Fix problem where gold cannot build .eh_frame_hdr from ld -r output. 10 years ago
ehframe.h Discard FDEs for zero-length address ranges. 10 years ago
errors.cc Fix problem where gold fails to issue an undefined symbol error during LTO. 10 years ago
errors.h Copyright update for binutils 10 years ago
expression.cc Copyright update for binutils 10 years ago
ffsll.c Copyright update for binutils 10 years ago
fileread.cc Copyright update for binutils 10 years ago
fileread.h Copyright update for binutils 10 years ago
freebsd.h Copyright update for binutils 10 years ago
ftruncate.c Copyright update for binutils 10 years ago
gc.cc Copyright update for binutils 10 years ago
gc.h Refactor gold to enable support for MIPS-64 relocation format. 10 years ago
gdb-index.cc Copyright update for binutils 10 years ago
gdb-index.h Copyright update for binutils 10 years ago
gold-threads.cc Fix compilation error in MSYS2 environment. 10 years ago
gold-threads.h Copyright update for binutils 10 years ago
gold.cc Copyright update for binutils 10 years ago
gold.h Copyright update for binutils 10 years ago
i386.cc Fix extraneous complaints about missing expected TLS relocation (i386). 10 years ago
icf.cc 2016-02-05 Sriraman Tallam <tmsriram@google.com> 10 years ago
icf.h Copyright update for binutils 10 years ago
incremental-dump.cc Copyright update for binutils 10 years ago
incremental.cc Copyright update for binutils 10 years ago
incremental.h Copyright update for binutils 10 years ago
int_encoding.cc Copyright update for binutils 10 years ago
int_encoding.h Copyright update for binutils 10 years ago
layout.cc [gold] Implement -z stack-size option 10 years ago
layout.h [gold] Implement -z stack-size option 10 years ago
main.cc Copyright update for binutils 10 years ago
mapfile.cc Copyright update for binutils 10 years ago
mapfile.h Copyright update for binutils 10 years ago
merge.cc Copyright update for binutils 10 years ago
merge.h Copyright update for binutils 10 years ago
mips.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
mremap.c Copyright update for binutils 10 years ago
nacl.cc Copyright update for binutils 10 years ago
nacl.h Copyright update for binutils 10 years ago
object.cc Copyright update for binutils 10 years ago
object.h Refactor gold to enable support for MIPS-64 relocation format. 10 years ago
options.cc Copyright update for binutils 10 years ago
options.h Handle ARM-specific --target1-abs, --target1-rel and --target2 options 10 years ago
output.cc [GOLD] warning fixes 10 years ago
output.h [gold] Implement -z stack-size option 10 years ago
parameters.cc Copyright update for binutils 10 years ago
parameters.h Copyright update for binutils 10 years ago
plugin.cc Don't handle every plugin symbol as defined. 10 years ago
plugin.h Copyright update for binutils 10 years ago
powerpc.cc [GOLD] two more fall-through comments 10 years ago
pread.c Copyright update for binutils 10 years ago
readsyms.cc Copyright update for binutils 10 years ago
readsyms.h Copyright update for binutils 10 years ago
reduced_debug_output.cc Copyright update for binutils 10 years ago
reduced_debug_output.h Copyright update for binutils 10 years ago
reloc-types.h Refactor gold to enable support for MIPS-64 relocation format. 10 years ago
reloc.cc gold: Add view and view_size parameters to is_call_to_non_split. 10 years ago
reloc.h Fix compile errors about shift counts too large. 10 years ago
resolve.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
s390.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
script-c.h Implement SORT_BY_INIT_PRIORITY. 10 years ago
script-sections.cc PR gold/20462: Fix bogus layout on ARM with linker script using PHDRS clause 10 years ago
script-sections.h Copyright update for binutils 10 years ago
script.cc [gold] Implement HIDDEN syntax in linker scripts 10 years ago
script.h Copyright update for binutils 10 years ago
sparc.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
stringpool.cc Copyright update for binutils 10 years ago
stringpool.h Copyright update for binutils 10 years ago
symtab.cc Don't treat as separate symbols if unversioned symbol is undefined. 10 years ago
symtab.h Don't allow COPY relocations for protected symbols. 10 years ago
system.h Copyright update for binutils 10 years ago
target-reloc.h Fix problem where gold fails to issue an undefined symbol error during LTO. 10 years ago
target-select.cc Copyright update for binutils 10 years ago
target-select.h Copyright update for binutils 10 years ago
target.cc gold: Add view and view_size parameters to is_call_to_non_split. 10 years ago
target.h Add support for STT_SPARC_REGISTER symbols. 10 years ago
tilegx.cc [GOLD] two more fall-through comments 10 years ago
timer.cc Copyright update for binutils 10 years ago
timer.h Copyright update for binutils 10 years ago
tls.h Copyright update for binutils 10 years ago
token.h Copyright update for binutils 10 years ago
version.cc Update gold to version 1.12. 10 years ago
workqueue-internal.h Copyright update for binutils 10 years ago
workqueue-threads.cc Copyright update for binutils 10 years ago
workqueue.cc Copyright update for binutils 10 years ago
workqueue.h Copyright update for binutils 10 years ago
x86_64.cc [GOLD] -Wimplicit-fallthrough warning fixes 10 years ago
yyscript.y [gold] Implement HIDDEN syntax in linker scripts 10 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.