blob: 88c6f217531a3ccc262460b12f3b3037506a7880 [file] [log] [blame]
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +00001.. _index:
2
3lld - The LLVM Linker
4=====================
5
Rui Ueyamadf06d202015-11-20 22:47:42 +00006lld contains two linkers whose architectures are different from each other.
7One is a linker that implements native features directly.
8They are in `COFF` or `ELF` directories. Other directories contains the other
9implementation that is designed to be a set of modular code for creating
10linker tools. This document covers mainly the latter.
11For the former, please read README.md in `COFF` directory.
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000012
13* End-User Features:
14
15 * Compatible with existing linker options
16 * Reads standard Object Files (e.g. ELF, Mach-O, PE/COFF)
17 * Writes standard Executable Files (e.g. ELF, Mach-O, PE)
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000018 * Remove clang's reliance on "the system linker"
19 * Uses the LLVM `"UIUC" BSD-Style license`__.
20
21* Applications:
22
23 * Modular design
24 * Support cross linking
25 * Easy to add new CPU support
26 * Can be built as static tool or library
27
28* Design and Implementation:
29
30 * Extensive unit tests
31 * Internal linker model can be dumped/read to textual format
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000032 * Additional linking features can be plugged in as "passes"
33 * OS specific and CPU specific code factored out
34
35Why a new linker?
36-----------------
37
38The fact that clang relies on whatever linker tool you happen to have installed
39means that clang has been very conservative adopting features which require a
40recent linker.
41
42In the same way that the MC layer of LLVM has removed clang's reliance on the
43system assembler tool, the lld project will remove clang's reliance on the
44system linker tool.
45
46
47Current Status
48--------------
49
Ed Masteaaa317a2014-12-17 19:14:57 +000050lld can self host on x86-64 FreeBSD and Linux and x86 Windows.
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000051
Michael J. Spencer1dd27662014-03-07 01:42:19 +000052All SingleSource tests in test-suite pass on x86-64 Linux.
Michael J. Spencer31dffbb2013-01-15 02:00:48 +000053
Simon Atanasyane747a442014-09-08 14:56:20 +000054All SingleSource and MultiSource tests in the LLVM test-suite
55pass on MIPS 32-bit little-endian Linux.
56
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000057Source
58------
59
60lld is available in the LLVM SVN repository::
61
Nico Weber9b839f82014-12-23 18:52:41 +000062 svn co http://llvm.org/svn/llvm-project/lld/trunk lld
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000063
64lld is also available via the read-only git mirror::
65
66 git clone http://llvm.org/git/lld.git
67
Nico Weber9b839f82014-12-23 18:52:41 +000068Put it in llvm's tools/ directory, rerun cmake, then build target lld.
69
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000070Contents
71--------
72
73.. toctree::
74 :maxdepth: 2
75
76 design
Michael J. Spencer365f1ec2012-04-25 19:34:24 +000077 getting_started
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000078 development
Rui Ueyama3e373262014-03-05 22:35:32 +000079 windows_support
Michael J. Spencerd01c8fe2012-04-08 02:06:04 +000080 open_projects
81 sphinx_intro
82
83Indices and tables
84------------------
85
86* :ref:`genindex`
87* :ref:`search`
88
89__ http://llvm.org/docs/DeveloperPolicy.html#license