[lld][docs] Document two linker-script related options for lld ELF (#166313)
This is a follow up of the discussions in https://github.com/llvm/llvm-project/pull/163497
This commit is contained in:
parent
c6f45f51fb
commit
8e39bcd9c3
@ -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.
|
||||
|
||||
::
|
||||
|
||||
# `-T` is the alias for `--script` option.
|
||||
lld -T linker_script.lds
|
||||
|
||||
# `-dT` is the alias for `--default-script` option.
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user