Index: docs/ld.lld.1 =================================================================== --- docs/ld.lld.1 +++ docs/ld.lld.1 @@ -146,12 +146,12 @@ 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 , Fl E -Put symbols in the dynamic symbol table. .It Fl -fatal-warnings Treat warnings as errors. .It Fl -filter Ns = Ns Ar value , Fl F Ar value @@ -204,6 +204,10 @@ 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 @@ -214,10 +218,6 @@ Optimization level for LTO. .It Fl -lto-partitions Ns = Ns Ar value Number of LTO codegen partitions. -.It Fl L Ar dir , Fl -library-path Ns = Ns Ar dir -Add a directory to the library search path. -.It Fl l Ar libName, Fl -library Ns = Ns Ar libName -Root name of library to use. .It Fl -Map Ns = Ns Ar file , Fl M Ar file Print a link map to .Ar file . @@ -251,12 +251,34 @@ 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 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 +may be: +.Pp +.Bl -tag -width 2n -compact +.It Cm 0 +Disable string merging. +.It Cm 1 +Enable string merging. +.It Cm 2 +Enable string tail merging. +.El +.Pp +.Fl O Ns Cm 1 +is the default. .It Fl -oformat Ns = Ns Ar format Specify the format for the output object file. The only supported @@ -271,28 +293,6 @@ .Ar file . .It Fl -opt-remarks-with-hotness Include hotness information in the optimization remarks file. -.It Fl O Ns Ar value -Optimize output file size. -.Ar value -may be: -.Pp -.Bl -tag -width 2n -compact -.It Cm 0 -Disable string merging. -.It Cm 1 -Enable string merging. -.It Cm 2 -Enable string tail merging. -.El -.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 -pie Create a position independent executable. .It Fl -print-gc-sections @@ -384,6 +384,12 @@ 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 @@ -398,28 +404,22 @@ .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 , 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