Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions lld/docs/ELF/linker_script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ possible. We reserve the right to make different implementation choices where
it is appropriate for LLD. Intentional deviations will be documented in this
file.

Linker Script Specification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are two lld options related to setting the linker script,
`--script=<file>` and `--default-script=<file>`. The usage are illustrated below.

::

# This sets `--script=<file>` option under the hood.
lld -T linker_script.lds

# This sets `--default-script=<file>` option under the hood.
lld -dT linker_script.lds

When both options are given, `--script=<file>` takes precedence.
The intended use case of `--default-script` is to be used by toolchain
configurations, and users can override the script by specifying `--script` if
needed.

Symbol assignment
~~~~~~~~~~~~~~~~~

Expand Down
Loading