aboutsummaryrefslogtreecommitdiff
path: root/docs/ld.lld.1
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-02 17:33:42 +0000
commit84c4061b34e048f47e5eb4fbabc1558495e8157c (patch)
tree83f9a0fbaadd2f5e3adac8f066cc8160781b385d /docs/ld.lld.1
parent20d35e67e67f106f617c939725101223211659f0 (diff)
downloadsrc-84c4061b34e048f47e5eb4fbabc1558495e8157c.tar.gz
src-84c4061b34e048f47e5eb4fbabc1558495e8157c.zip
Notes
Diffstat (limited to 'docs/ld.lld.1')
-rw-r--r--docs/ld.lld.1142
1 files changed, 77 insertions, 65 deletions
diff --git a/docs/ld.lld.1 b/docs/ld.lld.1
index c9662856b891..0fdfe0ae7e89 100644
--- a/docs/ld.lld.1
+++ b/docs/ld.lld.1
@@ -3,7 +3,7 @@
.\"
.\" This man page documents only lld's ELF linking support, obtained originally
.\" from FreeBSD.
-.Dd April 28, 2018
+.Dd July 30, 2018
.Dt LD.LLD 1
.Os
.Sh NAME
@@ -30,6 +30,8 @@ These options are available:
.It Fl -allow-multiple-definition
Do not error if a symbol is defined multiple times.
The first definition will be used.
+.It Fl -apply-dynamic-relocs
+Apply link-time values for dynamic relocations.
.It Fl -as-needed
Only set
.Dv DT_NEEDED
@@ -38,14 +40,14 @@ for shared libraries if used.
Set the
.Dv DT_AUXILIARY
field to the specified name.
-.It Fl -Bdynamic
+.It Fl -Bdynamic , Fl -dy
Link against shared libraries.
-.It Fl -Bstatic
+.It Fl -Bstatic , Fl -static , Fl -dn
Do not link against shared libraries.
-.It Fl -Bsymbolic-functions
-Bind defined function symbols locally.
.It Fl -Bsymbolic
Bind defined symbols locally.
+.It Fl -Bsymbolic-functions
+Bind defined function symbols locally.
.It Fl -build-id Ns = Ns Ar value
Generate a build ID note.
.Ar value
@@ -93,7 +95,9 @@ may be
.Cm none
or
.Cm zlib .
-.It Fl -define-common
+.It Fl -cref
+Output cross reference table.
+.It Fl -define-common , Fl d
Assign space to common symbols.
.It Fl -defsym Ns = Ns Ar symbol Ns = Ns Ar expression
Define a symbol alias.
@@ -107,9 +111,9 @@ or
Demangle symbol names.
.It Fl -disable-new-dtags
Disable new dynamic tags.
-.It Fl -discard-all
+.It Fl -discard-all , Fl x
Delete all local symbols.
-.It Fl -discard-locals
+.It Fl -discard-locals , Fl X
Delete temporary local symbols.
.It Fl -discard-none
Keep all symbols in the symbol table.
@@ -126,7 +130,7 @@ Request creation of
section and
.Dv PT_GNU_EH_FRAME
segment header.
-.It Fl -emit-relocs
+.It Fl -emit-relocs , Fl q
Generate relocations in the output.
.It Fl -enable-new-dtags
Enable new dynamic tags.
@@ -142,21 +146,21 @@ A value of zero indicates that there is no limit.
Report unresolved symbols as errors.
.It Fl -exclude-libs Ns = Ns Ar value
Exclude static libraries from automatic export.
+.It Fl -export-dynamic , Fl E
+Put symbols in the dynamic symbol table.
.It Fl -export-dynamic-symbol Ns = Ns Ar symbol
Include
.Ar symbol
in the dynamic symbol table.
-.It Fl -export-dynamic
-Put symbols in the dynamic symbol table.
.It Fl -fatal-warnings
Treat warnings as errors.
-.It Fl -filter Ns = Ns Ar value
+.It Fl -filter Ns = Ns Ar value , Fl F Ar value
Set the
.Dv DT_FILTER
field to the specified value.
.It Fl -fini Ns = Ns Ar symbol
Specify a finalizer function.
-.It Fl -format Ns = Ns Ar input-format
+.It Fl -format Ns = Ns Ar input-format , Fl b Ar input-format
Specify the format of the inputs following this option.
.Ar input-format
may be one of
@@ -196,6 +200,14 @@ Set the base address to
.Ar value .
.It Fl -init Ns = Ns Ar symbol
Specify an initializer function.
+.It Fl -keep-unique Ns = Ns Ar symbol
+Do not fold
+.Ar symbol
+during ICF.
+.It Fl l Ar libName, Fl -library Ns = Ns Ar libName
+Root name of library to use.
+.It Fl L Ar dir , Fl -library-path Ns = Ns Ar dir
+Add a directory to the library search path.
.It Fl -lto-aa-pipeline Ns = Ns Ar value
AA pipeline to run during LTO.
Used in conjunction with
@@ -206,15 +218,11 @@ Passes to run during LTO.
Optimization level for LTO.
.It Fl -lto-partitions Ns = Ns Ar value
Number of LTO codegen partitions.
-.It Fl L Ar dir
-Add a directory to the library search path.
-.It Fl l Ar libName
-Root name of library to use.
-.It Fl -Map Ns = Ns Ar file
-Print a link map to
-.Ar file .
.It Fl m Ar value
Set target emulation.
+.It Fl -Map Ns = Ns Ar file , Fl M Ar file
+Print a link map to
+.Ar file .
.It Fl -no-as-needed
Always set
.Dv DT_NEEDED
@@ -243,26 +251,18 @@ Report version scripts that refer undefined symbols.
Report unresolved symbols even if the linker is creating a shared library.
.It Fl -no-whole-archive
Restores the default behavior of loading archive members.
-.It Fl -noinhibit-exec
-Retain the executable output file whenever it is still usable.
.It Fl -no-pie
Do not create a position independent executable.
+.It Fl -noinhibit-exec
+Retain the executable output file whenever it is still usable.
.It Fl -nostdlib
Only search directories specified on the command line.
-.It Fl -oformat Ns = Ns Ar format
-Specify the format for the output object file.
-The only supported
-.Ar format
-is
-.Cm binary ,
-which produces output with no ELF header.
-.It Fl -omagic
-Set the text and data sections to be readable and writable.
-.It Fl -opt-remarks-filename Ar file
-Write optimization remarks in YAML format to
-.Ar file .
-.It Fl -opt-remarks-with-hotness
-Include hotness information in the optimization remarks file.
+.It Fl o Ar path
+Write the output executable, library, or object to
+.Ar path .
+If not specified,
+.Dv a.out
+is used as a default.
.It Fl O Ns Ar value
Optimize output file size.
.Ar value
@@ -279,12 +279,20 @@ Enable string tail merging.
.Pp
.Fl O Ns Cm 1
is the default.
-.It Fl o Ar path
-Write the output executable, library, or object to
-.Ar path .
-If not specified,
-.Dv a.out
-is used as a default.
+.It Fl -oformat Ns = Ns Ar format
+Specify the format for the output object file.
+The only supported
+.Ar format
+is
+.Cm binary ,
+which produces output with no ELF header.
+.It Fl -omagic , Fl N
+Set the text and data sections to be readable and writable.
+.It Fl -opt-remarks-filename Ar file
+Write optimization remarks in YAML format to
+.Ar file .
+.It Fl -opt-remarks-with-hotness
+Include hotness information in the optimization remarks file.
.It Fl -pie
Create a position independent executable.
.It Fl -print-gc-sections
@@ -300,13 +308,13 @@ and
.It Fl -pop-state
Undo the effect of
.Fl -push-state.
-.It Fl -relocatable
+.It Fl -relocatable , Fl r
Create relocatable object file.
.It Fl -reproduce Ns = Ns Ar value
Dump linker invocation and input files for debugging.
.It Fl -retain-symbols-file Ns = Ns Ar file
Retain only the symbols listed in the file.
-.It Fl -rpath Ns = Ns Ar value
+.It Fl -rpath Ns = Ns Ar value , Fl R Ar value
Add a
.Dv DT_RUNPATH
to the output.
@@ -316,14 +324,14 @@ The supported values are
.Cm windows
and
.Cm posix .
-.It Fl -script Ns = Ns Ar file
+.It Fl -script Ns = Ns Ar file , Fl T Ar file
Read linker script from
.Ar file .
-.It Fl -section-start Ns = Ar section Ns = Ns Ar address
+.It Fl -section-start Ns = Ns Ar section Ns = Ns Ar address
Set address of section.
-.It Fl -shared
+.It Fl -shared , Fl -Bsharable
Build a shared object.
-.It Fl -soname Ns = Ns Ar value
+.It Fl -soname Ns = Ns Ar value , Fl h Ar value
Set
.Dv DT_SONAME
to
@@ -333,9 +341,9 @@ Specifies sections sorting rule when linkerscript is used.
.It Fl -start-lib
Start a grouping of objects that should be treated as if they were together
in an archive.
-.It Fl -strip-all
+.It Fl -strip-all , Fl s
Strip all symbols.
-.It Fl -strip-debug
+.It Fl -strip-debug , Fl S
Strip debugging information.
.It Fl -symbol-ordering-file Ns = Ns Ar file
Lay out sections in the order specified by
@@ -376,6 +384,12 @@ Same as
with
.Li .data
as the sectionname.
+.It Fl -Ttext Ns = Ns Ar value
+Same as
+.Fl -section-start
+with
+.Li .text
+as the sectionname.
.It Fl -thinlto-cache-dir Ns = Ns Ar value
Path to ThinLTO cached object file directory.
.It Fl -thinlto-cache-policy Ns = Ns Ar value
@@ -385,33 +399,27 @@ Number of ThinLTO jobs.
.It Fl -threads
Run the linker multi-threaded.
This option is enabled by default.
-.It Fl -trace-symbol Ns = Ns Ar symbol
-Trace references to
-.Ar symbol .
.It Fl -trace
Print the names of the input files.
-.It Fl -Ttext Ns = Ns Ar value
-Same as
-.Fl -section-start
-with
-.Li .text
-as the sectionname.
-.It Fl -undefined Ns = Ns Ar symbol
+.It Fl -trace-symbol Ns = Ns Ar symbol , Fl y Ar symbol
+Trace references to
+.Ar symbol .
+.It Fl -undefined Ns = Ns Ar symbol , Fl u Ar symbol
Force
.Ar symbol
to be an undefined symbol during linking.
.It Fl -unresolved-symbols Ns = Ns Ar value
Determine how to handle unresolved symbols.
+.It Fl v
+Display the version number and proceed with linking if object files are
+specified.
+.It Fl V , Fl -version
+Display the version number and exit.
.It Fl -verbose
Verbose mode.
.It Fl -version-script Ns = Ns Ar file
Read version script from
.Ar file .
-.It Fl V , Fl -version
-Display the version number and exit.
-.It Fl v
-Display the version number and proceed with linking if object files are
-specified.
.It Fl -warn-backrefs
Warn about reverse or cyclic dependencies to or between static archives.
This can be used to ensure linker invocation remains compatible with
@@ -432,6 +440,10 @@ Make the main stack executable.
Stack permissions are recorded in the
.Dv PT_GNU_STACK
segment.
+.It Cm initfirst
+Sets the
+.Dv DF_1_INITFIRST
+flag to indicate the module should be initialized first.
.It Cm muldefs
Do not error if a symbol is defined multiple times.
The first definition will be used.