Skip to content

Commit 8637016

Browse files
lld docs
1 parent 0b939de commit 8637016

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lld/docs/ELF/linker_script.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ possible. We reserve the right to make different implementation choices where
1717
it is appropriate for LLD. Intentional deviations will be documented in this
1818
file.
1919

20+
Linker Script Specification
21+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+
There are two lld options related to setting the linker script,
24+
`--script=<file>` and `--default-script=<file>`. The usage are illustrated below.
25+
26+
::
27+
28+
# This sets `--script=<file>` option under the hood.
29+
lld -T linker_script.lds
30+
31+
# This sets `--default-script=<file>` option under the hood.
32+
lld -dT linker_script.lds
33+
34+
When both options are given, `--script=<file>` takes precedence.
35+
The intended use case of `--default-script` is to be used by toolchain
36+
configurations, and users can override the script by specifying `--script` if
37+
needed.
38+
2039
Symbol assignment
2140
~~~~~~~~~~~~~~~~~
2241

0 commit comments

Comments
 (0)