forked from OSchip/llvm-project
lld/include/lld/Core/TODO.txt
- fix minor grammar stuff (I'm not a native speaker either, but it's hopefully a net improvement) - mention that lld/coff is used in production - update AArch64, ARM to production quality - remove lld/include/lld/Core/TODO.txt which looks outdated Differential Revision: https://reviews.llvm.org/D56600 llvm-svn: 351030
This commit is contained in:
parent
689b3b71af
commit
6a5d94cc08
|
@ -53,7 +53,7 @@ between speed, simplicity and extensibility.
|
||||||
until we need them to continue linking.
|
until we need them to continue linking.
|
||||||
When we need to do some costly operation (such as looking up
|
When we need to do some costly operation (such as looking up
|
||||||
a hash table for each symbol), we do it only once.
|
a hash table for each symbol), we do it only once.
|
||||||
We obtain a handler (which is typically just a pointer to actual data)
|
We obtain a handle (which is typically just a pointer to actual data)
|
||||||
on the first operation and use it throughout the process.
|
on the first operation and use it throughout the process.
|
||||||
|
|
||||||
* Efficient archive file handling
|
* Efficient archive file handling
|
||||||
|
@ -90,18 +90,18 @@ between speed, simplicity and extensibility.
|
||||||
`--end-group`, to let the linker loop over the files between the options until
|
`--end-group`, to let the linker loop over the files between the options until
|
||||||
no new symbols are added to the set.
|
no new symbols are added to the set.
|
||||||
|
|
||||||
Visiting the same archive files multiple makes the linker slower.
|
Visiting the same archive files multiple times makes the linker slower.
|
||||||
|
|
||||||
Here is how LLD approaches the problem. Instead of memorizing only undefined
|
Here is how LLD approaches the problem. Instead of memorizing only undefined
|
||||||
symbols, we program LLD so that it memorizes all symbols. When it sees an
|
symbols, we program LLD so that it memorizes all symbols. When it sees an
|
||||||
undefined symbol that can be resolved by extracting an object file from an
|
undefined symbol that can be resolved by extracting an object file from an
|
||||||
archive file it previously visited, it immediately extracts the file and link
|
archive file it previously visited, it immediately extracts the file and links
|
||||||
it. It is doable because LLD does not forget symbols it have seen in archive
|
it. It is doable because LLD does not forget symbols it has seen in archive
|
||||||
files.
|
files.
|
||||||
|
|
||||||
We believe that the LLD's way is efficient and easy to justify.
|
We believe that LLD's way is efficient and easy to justify.
|
||||||
|
|
||||||
The semantics of LLD's archive handling is different from the traditional
|
The semantics of LLD's archive handling are different from the traditional
|
||||||
Unix's. You can observe it if you carefully craft archive files to exploit
|
Unix's. You can observe it if you carefully craft archive files to exploit
|
||||||
it. However, in reality, we don't know any program that cannot link with our
|
it. However, in reality, we don't know any program that cannot link with our
|
||||||
algorithm so far, so it's not going to cause trouble.
|
algorithm so far, so it's not going to cause trouble.
|
||||||
|
@ -157,7 +157,7 @@ functions, the code of the linker should look obvious to you.
|
||||||
- Undefined symbols represent undefined symbols, which need to be replaced by
|
- Undefined symbols represent undefined symbols, which need to be replaced by
|
||||||
Defined symbols by the resolver until the link is complete.
|
Defined symbols by the resolver until the link is complete.
|
||||||
- Lazy symbols represent symbols we found in archive file headers
|
- Lazy symbols represent symbols we found in archive file headers
|
||||||
which can turn into Defined if we read archieve members.
|
which can turn into Defined if we read archive members.
|
||||||
|
|
||||||
There's only one Symbol instance for each unique symbol name. This uniqueness
|
There's only one Symbol instance for each unique symbol name. This uniqueness
|
||||||
is guaranteed by the symbol table. As the resolver reads symbols from input
|
is guaranteed by the symbol table. As the resolver reads symbols from input
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
LLD - The LLVM Linker
|
LLD - The LLVM Linker
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
LLD is a linker from the LLVM project. That is a drop-in replacement
|
LLD is a linker from the LLVM project that is a drop-in replacement
|
||||||
for system linkers and runs much faster than them. It also provides
|
for system linkers and runs much faster than them. It also provides
|
||||||
features that are useful for toolchain developers.
|
features that are useful for toolchain developers.
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ read :doc:`AtomLLD`.
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- LLD is a drop-in replacement for the GNU linkers. That accepts the
|
- LLD is a drop-in replacement for the GNU linkers that accepts the
|
||||||
same command line arguments and linker scripts as GNU.
|
same command line arguments and linker scripts as GNU.
|
||||||
|
|
||||||
We are currently working closely with the FreeBSD project to make
|
We are currently working closely with the FreeBSD project to make
|
||||||
|
@ -30,29 +30,27 @@ Features
|
||||||
<https://www.freebsd.org/news/status/report-2016-10-2016-12.html#Using-LLVM%27s-LLD-Linker-as-FreeBSD%27s-System-Linker>`_.
|
<https://www.freebsd.org/news/status/report-2016-10-2016-12.html#Using-LLVM%27s-LLD-Linker-as-FreeBSD%27s-System-Linker>`_.
|
||||||
|
|
||||||
- LLD is very fast. When you link a large program on a multicore
|
- LLD is very fast. When you link a large program on a multicore
|
||||||
machine, you can expect that LLD runs more than twice as fast as GNU
|
machine, you can expect that LLD runs more than twice as fast as the GNU
|
||||||
gold linker. Your milage may vary, though.
|
gold linker. Your milage may vary, though.
|
||||||
|
|
||||||
- It supports various CPUs/ABIs including x86-64, x86, x32, AArch64,
|
- It supports various CPUs/ABIs including x86-64, x86, x32, AArch64,
|
||||||
ARM, MIPS 32/64 big/little-endian, PowerPC, PowerPC 64 and AMDGPU.
|
ARM, MIPS 32/64 big/little-endian, PowerPC, PowerPC 64 and AMDGPU.
|
||||||
Among these, x86-64 is the most well-supported target and have
|
Among these, x86-64, AArch64, and ARM (>= v6) are production quality.
|
||||||
reached production quality. AArch64 and MIPS seem decent too. x86
|
MIPS seems decent too. x86 should be OK but is not well tested yet.
|
||||||
should be OK but not well tested yet. ARM support is being developed
|
|
||||||
actively.
|
|
||||||
|
|
||||||
- It is always a cross-linker, meaning that it always supports all the
|
- It is always a cross-linker, meaning that it always supports all the
|
||||||
above targets however it was built. In fact, we don't provide a
|
above targets however it was built. In fact, we don't provide a
|
||||||
build-time option to enable/disable each target. This should make it
|
build-time option to enable/disable each target. This should make it
|
||||||
easy to use our linker as part of a cross-compile toolchain.
|
easy to use our linker as part of a cross-compile toolchain.
|
||||||
|
|
||||||
- You can embed LLD to your program to eliminate dependency to
|
- You can embed LLD in your program to eliminate dependencies on
|
||||||
external linkers. All you have to do is to construct object files
|
external linkers. All you have to do is to construct object files
|
||||||
and command line arguments just like you would do to invoke an
|
and command line arguments just like you would do to invoke an
|
||||||
external linker and then call the linker's main function,
|
external linker and then call the linker's main function,
|
||||||
``lld::elf::link``, from your code.
|
``lld::elf::link``, from your code.
|
||||||
|
|
||||||
- It is small. We are using LLVM libObject library to read from object
|
- It is small. We are using LLVM libObject library to read from object
|
||||||
files, so it is not completely a fair comparison, but as of February
|
files, so it is not a completely fair comparison, but as of February
|
||||||
2017, LLD/ELF consists only of 21k lines of C++ code while GNU gold
|
2017, LLD/ELF consists only of 21k lines of C++ code while GNU gold
|
||||||
consists of 198k lines of C++ code.
|
consists of 198k lines of C++ code.
|
||||||
|
|
||||||
|
@ -102,8 +100,8 @@ under ``tools`` directory just like you probably did for clang. For the
|
||||||
details, see `Getting Started with the LLVM System
|
details, see `Getting Started with the LLVM System
|
||||||
<http://llvm.org/docs/GettingStarted.html>`_.
|
<http://llvm.org/docs/GettingStarted.html>`_.
|
||||||
|
|
||||||
If you haven't checkout out LLVM, the easiest way to build LLD is to
|
If you haven't checked out LLVM, the easiest way to build LLD is to
|
||||||
checkout the entire LLVM projects/sub-projects from a git mirror and
|
check out the entire LLVM projects/sub-projects from a git mirror and
|
||||||
build that tree. You need `cmake` and of course a C++ compiler.
|
build that tree. You need `cmake` and of course a C++ compiler.
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
Open Projects
|
Open Projects
|
||||||
=============
|
=============
|
||||||
|
|
||||||
.. include:: ../include/lld/Core/TODO.txt
|
|
||||||
|
|
||||||
Documentation TODOs
|
Documentation TODOs
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ command line options, and it drives further linking processes. LLD accepts
|
||||||
almost all command line options that the linker shipped with Microsoft Visual
|
almost all command line options that the linker shipped with Microsoft Visual
|
||||||
C++ (link.exe) supports.
|
C++ (link.exe) supports.
|
||||||
|
|
||||||
The current status is that LLD can link itself on Windows x86/x64
|
The current status is that LLD is used to link production builds of large
|
||||||
using Visual C++ 2013 as the compiler.
|
real-world binaries such as Firefox and Chromium.
|
||||||
|
|
||||||
Development status
|
Development status
|
||||||
==================
|
==================
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
include/lld/Core
|
|
||||||
~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
* The yaml reader/writer interfaces should be changed to return
|
|
||||||
an explanatory string if there is an error. The existing error_code
|
|
||||||
abstraction only works for returning low level OS errors. It does not
|
|
||||||
work for describing formatting issues.
|
|
||||||
|
|
||||||
* We need to add more attributes to File. In particular, we need cpu
|
|
||||||
and OS information (like target triples). We should also provide explicit
|
|
||||||
support for `LLVM IR module flags metadata`__.
|
|
||||||
|
|
||||||
.. __: http://llvm.org/docs/LangRef.html#module_flags
|
|
||||||
.. _Clang: http://clang.llvm.org/docs/InternalsManual.html#Diagnostics
|
|
Loading…
Reference in New Issue