Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 1 | .. _index: |
| 2 | |
| 3 | lld - The LLVM Linker |
| 4 | ===================== |
| 5 | |
Rui Ueyama | df06d20 | 2015-11-20 22:47:42 +0000 | [diff] [blame^] | 6 | lld contains two linkers whose architectures are different from each other. |
| 7 | One is a linker that implements native features directly. |
| 8 | They are in `COFF` or `ELF` directories. Other directories contains the other |
| 9 | implementation that is designed to be a set of modular code for creating |
| 10 | linker tools. This document covers mainly the latter. |
| 11 | For the former, please read README.md in `COFF` directory. |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 12 | |
| 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. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 18 | * 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. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 32 | * Additional linking features can be plugged in as "passes" |
| 33 | * OS specific and CPU specific code factored out |
| 34 | |
| 35 | Why a new linker? |
| 36 | ----------------- |
| 37 | |
| 38 | The fact that clang relies on whatever linker tool you happen to have installed |
| 39 | means that clang has been very conservative adopting features which require a |
| 40 | recent linker. |
| 41 | |
| 42 | In the same way that the MC layer of LLVM has removed clang's reliance on the |
| 43 | system assembler tool, the lld project will remove clang's reliance on the |
| 44 | system linker tool. |
| 45 | |
| 46 | |
| 47 | Current Status |
| 48 | -------------- |
| 49 | |
Ed Maste | aaa317a | 2014-12-17 19:14:57 +0000 | [diff] [blame] | 50 | lld can self host on x86-64 FreeBSD and Linux and x86 Windows. |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 51 | |
Michael J. Spencer | 1dd2766 | 2014-03-07 01:42:19 +0000 | [diff] [blame] | 52 | All SingleSource tests in test-suite pass on x86-64 Linux. |
Michael J. Spencer | 31dffbb | 2013-01-15 02:00:48 +0000 | [diff] [blame] | 53 | |
Simon Atanasyan | e747a44 | 2014-09-08 14:56:20 +0000 | [diff] [blame] | 54 | All SingleSource and MultiSource tests in the LLVM test-suite |
| 55 | pass on MIPS 32-bit little-endian Linux. |
| 56 | |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 57 | Source |
| 58 | ------ |
| 59 | |
| 60 | lld is available in the LLVM SVN repository:: |
| 61 | |
Nico Weber | 9b839f8 | 2014-12-23 18:52:41 +0000 | [diff] [blame] | 62 | svn co http://llvm.org/svn/llvm-project/lld/trunk lld |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 63 | |
| 64 | lld is also available via the read-only git mirror:: |
| 65 | |
| 66 | git clone http://llvm.org/git/lld.git |
| 67 | |
Nico Weber | 9b839f8 | 2014-12-23 18:52:41 +0000 | [diff] [blame] | 68 | Put it in llvm's tools/ directory, rerun cmake, then build target lld. |
| 69 | |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 70 | Contents |
| 71 | -------- |
| 72 | |
| 73 | .. toctree:: |
| 74 | :maxdepth: 2 |
| 75 | |
| 76 | design |
Michael J. Spencer | 365f1ec | 2012-04-25 19:34:24 +0000 | [diff] [blame] | 77 | getting_started |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 78 | development |
Rui Ueyama | 3e37326 | 2014-03-05 22:35:32 +0000 | [diff] [blame] | 79 | windows_support |
Michael J. Spencer | d01c8fe | 2012-04-08 02:06:04 +0000 | [diff] [blame] | 80 | open_projects |
| 81 | sphinx_intro |
| 82 | |
| 83 | Indices and tables |
| 84 | ------------------ |
| 85 | |
| 86 | * :ref:`genindex` |
| 87 | * :ref:`search` |
| 88 | |
| 89 | __ http://llvm.org/docs/DeveloperPolicy.html#license |