llvm-project/lld/docs
Fangrui Song 232578804a [ELF] Add --warn-backrefs-exclude=<glob>
D77522 changed --warn-backrefs to not warn for linking sandwich
problems (-ldef1 -lref -ldef2). This removed lots of false positives.

However, glibc still has some problems. libc.a defines some symbols
which are normally in libm.a and libpthread.a, e.g. __isnanl/raise.

For a linking order `-lm -lpthread -lc`, I have seen:

```
// different resolutions: GNU ld/gold select libc.a(s_isnan.o) as the definition
backward reference detected: __isnanl in libc.a(printf_fp.o) refers to libm.a(m_isnanl.o)

// different resolutions: GNU ld/gold select libc.a(raise.o) as the definition
backward reference detected: raise in libc.a(abort.o) refers to libpthread.a(pt-raise.o)
```

To facilitate deployment of --warn-backrefs, add --warn-backrefs-exclude= so that
certain known issues (which may be impractical to fix) can be whitelisted.

Deliberate choices:

* Not a comma-separated list (`--warn-backrefs-exclude=liba.a,libb.a`).
  -Wl, splits the argument at commas, so we cannot use commas.
  --export-dynamic-symbol is similar.
* Not in the style of `--warn-backrefs='*' --warn-backrefs=-liba.a`.
  We just need exclusion, not inclusion. For easier build system
  integration, we should avoid order dependency. With the current
  scheme, we enable --warn-backrefs, and indivial libraries can add
  --warn-backrefs-exclude=<glob> to their LDFLAGS.

Reviewed By: psmith

Differential Revision: https://reviews.llvm.org/D77512
2020-04-20 07:52:15 -07:00
..
ELF [ELF] Propagate LMA offset to sections with neither AT() nor AT> 2020-04-01 08:19:06 -07:00
_static
_templates Fixed link to bugzilla in the sidebar 2017-11-08 10:10:31 +00:00
llvm-theme
AtomLLD.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
CMakeLists.txt
Driver.rst fix yet another doc typo to cycle bots 2019-12-20 22:25:14 -05:00
NewLLD.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
Partitions.rst docs: Update partitioning docs now that the feature is fully landed. 2019-06-07 19:23:19 +00:00
README.txt [WebAssembly] Update docs 2018-11-29 02:55:25 +00:00
Readers.rst key method -> key function 2018-12-21 22:40:10 +00:00
ReleaseNotes.rst Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
WebAssembly.rst fix typo 2020-03-02 21:01:50 -05:00
conf.py Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
design.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
development.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
getting_started.rst doc: use the right url to bugzilla 2020-03-22 22:49:40 +01:00
hello.png
index.rst Doc: Links should use https 2020-03-22 22:49:33 +01:00
ld.lld.1 [ELF] Add --warn-backrefs-exclude=<glob> 2020-04-20 07:52:15 -07:00
make.bat
missingkeyfunction.rst Fix two sphinx warnings 2019-04-11 07:31:03 +00:00
open_projects.rst lld/include/lld/Core/TODO.txt 2019-01-14 00:45:27 +00:00
partitions.dot Add IR support, ELF section and user documentation for partitioning feature. 2019-05-29 03:29:01 +00:00
partitions.svg Add IR support, ELF section and user documentation for partitioning feature. 2019-05-29 03:29:01 +00:00
sphinx_intro.rst [Docs] Modernize references to macOS 2019-05-30 16:46:22 +00:00
windows_support.rst [lld] Fix trivial typos in comments 2020-01-06 10:25:48 -08:00

README.txt

lld Documentation
=================

The lld documentation is written using the Sphinx documentation generator. It is
currently tested with Sphinx 1.1.3.

We currently use the 'nature' theme and a Beaker inspired structure.

See sphinx_intro.rst for more details.