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 fbad6518c1 ChangeLog typo fix 12 years ago
..
po Regen gold POTFILES.in 12 years ago
testsuite Compile pie_copyrelocs_test.cc with -fno-exceptions -fno-asynchronous-unwind-tables 12 years ago
ChangeLog ChangeLog typo fix 12 years ago
Makefile.am gold aarch64 patch to enable linking hello_wolrd. 12 years ago
Makefile.in Regenerate gold/Makefile.in. 12 years ago
NEWS Update copyright years 12 years ago
README Update copyright years 12 years ago
TODO * TODO: New file. 18 years ago
aarch64-reloc-property.cc The 3rd patch for aarch64 gold. 12 years ago
aarch64-reloc-property.h gold aarch64 patch to enable linking hello_wolrd. 12 years ago
aarch64-reloc.def Misc about gold for aarch64 backend. 12 years ago
aarch64.cc Fix for gold linking tlsdesc into an executable with -pie. 12 years ago
aclocal.m4 * configure.ac (HAVE_ZLIB): Use AM_ZLIB instead of AC_SEARCH_LIBS. 14 years ago
archive.cc Update copyright years 12 years ago
archive.h Update copyright years 12 years ago
arm-reloc-property.cc Update copyright years 12 years ago
arm-reloc-property.h Update copyright years 12 years ago
arm-reloc.def Update copyright years 12 years ago
arm.cc Fix internal error with LTO on ARM. 12 years ago
attributes.cc Update copyright years 12 years ago
attributes.h Update copyright years 12 years ago
binary.cc Add file size to ELF symbol labelling start of a binary file. 12 years ago
binary.h Add file size to ELF symbol labelling start of a binary file. 12 years ago
common.cc Update copyright years 12 years ago
common.h Update copyright years 12 years ago
compressed_output.cc Update copyright years 12 years ago
compressed_output.h Update copyright years 12 years ago
config.in Add configure checks for <unordered_set> and <unordered_map>. 12 years ago
configure 2014-07-02 Jing Yu <jingyu@google.com> 12 years ago
configure.ac 2014-07-02 Jing Yu <jingyu@google.com> 12 years ago
configure.tgt * configure.tgt (targ_extra_obj) [aarch64*-*]: Define. 12 years ago
copy-relocs.cc Allow target to derive from Copy_relocs class. 12 years ago
copy-relocs.h Allow target to derive from Copy_relocs class. 12 years ago
cref.cc Update copyright years 12 years ago
cref.h Update copyright years 12 years ago
debug.h Update copyright years 12 years ago
defstd.cc Fix handling of __ehdr_start when it cannot be defined. 12 years ago
defstd.h Update copyright years 12 years ago
descriptors.cc Update copyright years 12 years ago
descriptors.h Update copyright years 12 years ago
dirsearch.cc Update copyright years 12 years ago
dirsearch.h Update copyright years 12 years ago
dwarf_reader.cc Add check to keep from segfaulting on a corrupt .debug_pubnames section. 12 years ago
dwarf_reader.h Strip .debug_gnu_pubnames and .debug_gnu_pubtypes when building .gdb_index. 12 years ago
dwp.cc Make Elf_file::section_name() a const function, so that it can be used in 12 years ago
dwp.h Update copyright years 12 years ago
dynobj.cc Fix internal error with LTO on ARM. 12 years ago
dynobj.h Make Elf_file::section_name() a const function, so that it can be used in 12 years ago
ehframe.cc Fix problem with optimization of .eh_frame section and --sort-section option. 12 years ago
ehframe.h Fix problem with optimization of .eh_frame section and --sort-section option. 12 years ago
errors.cc Update copyright years 12 years ago
errors.h Update copyright years 12 years ago
expression.cc Fix --defsym to copy symbol attributes. 12 years ago
ffsll.c Update copyright years 12 years ago
fileread.cc Update copyright years 12 years ago
fileread.h Update copyright years 12 years ago
freebsd.h Update copyright years 12 years ago
ftruncate.c Update copyright years 12 years ago
gc.cc Update copyright years 12 years ago
gc.h Update copyright years 12 years ago
gdb-index.cc Don't complain about the source language when we have pubnames/pubtypes info. 12 years ago
gdb-index.h Update copyright years 12 years ago
gold-threads.cc Update copyright years 12 years ago
gold-threads.h Update copyright years 12 years ago
gold.cc Fix race condition causing assert in Eh_frame_hdr::do_sized_write(). 12 years ago
gold.h Update copyright years 12 years ago
i386.cc With -pie and x86, the linker complains if it sees a PC-relative relocation 12 years ago
icf.cc 2014-04-02 Sriraman Tallam <tmsriram@google.com> 12 years ago
icf.h Update copyright years 12 years ago
incremental-dump.cc Update copyright years 12 years ago
incremental.cc Make Elf_file::section_name() a const function, so that it can be used in 12 years ago
incremental.h Make Elf_file::section_name() a const function, so that it can be used in 12 years ago
int_encoding.cc Update copyright years 12 years ago
int_encoding.h Update copyright years 12 years ago
layout.cc Add support for -z global. 12 years ago
layout.h Fix race condition causing assert in Eh_frame_hdr::do_sized_write(). 12 years ago
main.cc Update copyright years 12 years ago
mapfile.cc Update copyright years 12 years ago
mapfile.h Update copyright years 12 years ago
merge.cc Update copyright years 12 years ago
merge.h Update copyright years 12 years ago
mips.cc Add NaCl (NativeClient) specific classes Target_mips_nacl and 12 years ago
mremap.c Update copyright years 12 years ago
nacl.cc Update copyright years 12 years ago
nacl.h Update copyright years 12 years ago
object.cc Fix corrupted .eh_frame section with LTO and --gc-sections. 12 years ago
object.h Fix corrupted .eh_frame section with LTO and --gc-sections. 12 years ago
options.cc Update copyright years 12 years ago
options.h Add support for -z global. 12 years ago
output.cc Fix problem with optimization of .eh_frame section and --sort-section option. 12 years ago
output.h Allow target to add custom dynamic table entries. 12 years ago
parameters.cc Update copyright years 12 years ago
parameters.h Update copyright years 12 years ago
plugin.cc Fix race condition when using --threads with linker plugins. 12 years ago
plugin.h Fix race condition when using --threads with linker plugins. 12 years ago
powerpc.cc PowerPC gold, fix 32-bit branch address arithmetic 12 years ago
pread.c Update copyright years 12 years ago
readsyms.cc Update copyright years 12 years ago
readsyms.h Update copyright years 12 years ago
reduced_debug_output.cc Update copyright years 12 years ago
reduced_debug_output.h Update copyright years 12 years ago
reloc-types.h Update copyright years 12 years ago
reloc.cc Update copyright years 12 years ago
reloc.h Update copyright years 12 years ago
resolve.cc Fix error from previous patch where tosize and tovalue were redefined 12 years ago
script-c.h Update copyright years 12 years ago
script-sections.cc Update copyright years 12 years ago
script-sections.h Update copyright years 12 years ago
script.cc Fix --defsym to copy symbol attributes. 12 years ago
script.h Fix --defsym to copy symbol attributes. 12 years ago
sparc.cc With -pie and x86, the linker complains if it sees a PC-relative relocation 12 years ago
stringpool.cc Update copyright years 12 years ago
stringpool.h Update copyright years 12 years ago
symtab.cc powerpc gold, work around pr17670 12 years ago
symtab.h Fix --defsym to copy symbol attributes. 12 years ago
system.h Update copyright years 12 years ago
target-reloc.h Fix handling of __ehdr_start when it cannot be defined. 12 years ago
target-select.cc Update copyright years 12 years ago
target-select.h Update copyright years 12 years ago
target.cc Update copyright years 12 years ago
target.h Allow target to decide whether to include a section. 12 years ago
tilegx.cc With -pie and x86, the linker complains if it sees a PC-relative relocation 12 years ago
timer.cc Update copyright years 12 years ago
timer.h Update copyright years 12 years ago
tls.h Update copyright years 12 years ago
token.h Update copyright years 12 years ago
version.cc Update copyright years 12 years ago
workqueue-internal.h Update copyright years 12 years ago
workqueue-threads.cc Update copyright years 12 years ago
workqueue.cc Update copyright years 12 years ago
workqueue.h Update copyright years 12 years ago
x86_64.cc Check PC-relative offset overflow in PLT entry 12 years ago
yyscript.y Update copyright years 12 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-2014 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.