徐启航 0ef513762e Init 2 lat temu
..
po 0ef513762e Init 2 lat temu
testsuite 0ef513762e Init 2 lat temu
ChangeLog 0ef513762e Init 2 lat temu
ChangeLog-0815 0ef513762e Init 2 lat temu
ChangeLog-2016 0ef513762e Init 2 lat temu
ChangeLog-2017 0ef513762e Init 2 lat temu
ChangeLog-2018 0ef513762e Init 2 lat temu
ChangeLog-2019 0ef513762e Init 2 lat temu
ChangeLog-2020 0ef513762e Init 2 lat temu
Makefile.am 0ef513762e Init 2 lat temu
Makefile.in 0ef513762e Init 2 lat temu
NEWS 0ef513762e Init 2 lat temu
README 0ef513762e Init 2 lat temu
TODO 0ef513762e Init 2 lat temu
aarch64-reloc-property.cc 0ef513762e Init 2 lat temu
aarch64-reloc-property.h 0ef513762e Init 2 lat temu
aarch64-reloc.def 0ef513762e Init 2 lat temu
aarch64.cc 0ef513762e Init 2 lat temu
aclocal.m4 0ef513762e Init 2 lat temu
archive.cc 0ef513762e Init 2 lat temu
archive.h 0ef513762e Init 2 lat temu
arm-reloc-property.cc 0ef513762e Init 2 lat temu
arm-reloc-property.h 0ef513762e Init 2 lat temu
arm-reloc.def 0ef513762e Init 2 lat temu
arm.cc 0ef513762e Init 2 lat temu
attributes.cc 0ef513762e Init 2 lat temu
attributes.h 0ef513762e Init 2 lat temu
binary.cc 0ef513762e Init 2 lat temu
binary.h 0ef513762e Init 2 lat temu
common.cc 0ef513762e Init 2 lat temu
common.h 0ef513762e Init 2 lat temu
compressed_output.cc 0ef513762e Init 2 lat temu
compressed_output.h 0ef513762e Init 2 lat temu
config.in 0ef513762e Init 2 lat temu
configure 0ef513762e Init 2 lat temu
configure.ac 0ef513762e Init 2 lat temu
configure.tgt 0ef513762e Init 2 lat temu
copy-relocs.cc 0ef513762e Init 2 lat temu
copy-relocs.h 0ef513762e Init 2 lat temu
cref.cc 0ef513762e Init 2 lat temu
cref.h 0ef513762e Init 2 lat temu
debug.h 0ef513762e Init 2 lat temu
defstd.cc 0ef513762e Init 2 lat temu
defstd.h 0ef513762e Init 2 lat temu
descriptors.cc 0ef513762e Init 2 lat temu
descriptors.h 0ef513762e Init 2 lat temu
dirsearch.cc 0ef513762e Init 2 lat temu
dirsearch.h 0ef513762e Init 2 lat temu
dwarf_reader.cc 0ef513762e Init 2 lat temu
dwarf_reader.h 0ef513762e Init 2 lat temu
dwp.cc 0ef513762e Init 2 lat temu
dwp.h 0ef513762e Init 2 lat temu
dynobj.cc 0ef513762e Init 2 lat temu
dynobj.h 0ef513762e Init 2 lat temu
ehframe.cc 0ef513762e Init 2 lat temu
ehframe.h 0ef513762e Init 2 lat temu
errors.cc 0ef513762e Init 2 lat temu
errors.h 0ef513762e Init 2 lat temu
expression.cc 0ef513762e Init 2 lat temu
ffsll.c 0ef513762e Init 2 lat temu
fileread.cc 0ef513762e Init 2 lat temu
fileread.h 0ef513762e Init 2 lat temu
freebsd.h 0ef513762e Init 2 lat temu
ftruncate.c 0ef513762e Init 2 lat temu
gc.cc 0ef513762e Init 2 lat temu
gc.h 0ef513762e Init 2 lat temu
gdb-index.cc 0ef513762e Init 2 lat temu
gdb-index.h 0ef513762e Init 2 lat temu
gold-threads.cc 0ef513762e Init 2 lat temu
gold-threads.h 0ef513762e Init 2 lat temu
gold.cc 0ef513762e Init 2 lat temu
gold.h 0ef513762e Init 2 lat temu
i386.cc 0ef513762e Init 2 lat temu
icf.cc 0ef513762e Init 2 lat temu
icf.h 0ef513762e Init 2 lat temu
incremental-dump.cc 0ef513762e Init 2 lat temu
incremental.cc 0ef513762e Init 2 lat temu
incremental.h 0ef513762e Init 2 lat temu
int_encoding.cc 0ef513762e Init 2 lat temu
int_encoding.h 0ef513762e Init 2 lat temu
layout.cc 0ef513762e Init 2 lat temu
layout.h 0ef513762e Init 2 lat temu
main.cc 0ef513762e Init 2 lat temu
mapfile.cc 0ef513762e Init 2 lat temu
mapfile.h 0ef513762e Init 2 lat temu
merge.cc 0ef513762e Init 2 lat temu
merge.h 0ef513762e Init 2 lat temu
mips.cc 0ef513762e Init 2 lat temu
mremap.c 0ef513762e Init 2 lat temu
nacl.cc 0ef513762e Init 2 lat temu
nacl.h 0ef513762e Init 2 lat temu
object.cc 0ef513762e Init 2 lat temu
object.h 0ef513762e Init 2 lat temu
options.cc 0ef513762e Init 2 lat temu
options.h 0ef513762e Init 2 lat temu
output.cc 0ef513762e Init 2 lat temu
output.h 0ef513762e Init 2 lat temu
parameters.cc 0ef513762e Init 2 lat temu
parameters.h 0ef513762e Init 2 lat temu
plugin.cc 0ef513762e Init 2 lat temu
plugin.h 0ef513762e Init 2 lat temu
powerpc.cc 0ef513762e Init 2 lat temu
pread.c 0ef513762e Init 2 lat temu
readsyms.cc 0ef513762e Init 2 lat temu
readsyms.h 0ef513762e Init 2 lat temu
reduced_debug_output.cc 0ef513762e Init 2 lat temu
reduced_debug_output.h 0ef513762e Init 2 lat temu
reloc-types.h 0ef513762e Init 2 lat temu
reloc.cc 0ef513762e Init 2 lat temu
reloc.h 0ef513762e Init 2 lat temu
resolve.cc 0ef513762e Init 2 lat temu
s390.cc 0ef513762e Init 2 lat temu
script-c.h 0ef513762e Init 2 lat temu
script-sections.cc 0ef513762e Init 2 lat temu
script-sections.h 0ef513762e Init 2 lat temu
script.cc 0ef513762e Init 2 lat temu
script.h 0ef513762e Init 2 lat temu
sparc.cc 0ef513762e Init 2 lat temu
stringpool.cc 0ef513762e Init 2 lat temu
stringpool.h 0ef513762e Init 2 lat temu
symtab.cc 0ef513762e Init 2 lat temu
symtab.h 0ef513762e Init 2 lat temu
system.h 0ef513762e Init 2 lat temu
target-reloc.h 0ef513762e Init 2 lat temu
target-select.cc 0ef513762e Init 2 lat temu
target-select.h 0ef513762e Init 2 lat temu
target.cc 0ef513762e Init 2 lat temu
target.h 0ef513762e Init 2 lat temu
tilegx.cc 0ef513762e Init 2 lat temu
timer.cc 0ef513762e Init 2 lat temu
timer.h 0ef513762e Init 2 lat temu
tls.h 0ef513762e Init 2 lat temu
token.h 0ef513762e Init 2 lat temu
version.cc 0ef513762e Init 2 lat temu
workqueue-internal.h 0ef513762e Init 2 lat temu
workqueue-threads.cc 0ef513762e Init 2 lat temu
workqueue.cc 0ef513762e Init 2 lat temu
workqueue.h 0ef513762e Init 2 lat temu
x86_64.cc 0ef513762e Init 2 lat temu
yyscript.y 0ef513762e Init 2 lat temu

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-2022 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.