OS Manuals

/usr/bin/ld.lld

Swift is a high-performance system programming language. It has a clean and modern syntax, offers seamless access to existing C and Objective-C code and frameworks, and is memory-safe by default.

From swift-bootstrap-5-10-1 5.10.1-r7 (enterprise-packages), captured 2026-11-08 by running ld.lld --help (exit 0). permalink

OVERVIEW: lld

USAGE: /usr/bin/ld.lld [options] file...

OPTIONS:
  -(                      Alias for --start-group
  -)                      Alias for --end-group
  --allow-multiple-definition
                          Allow multiple definitions
  --allow-shlib-undefined Allow unresolved references in shared libraries (default when linking a shared library)
  --android-memtag-heap   Instruct the dynamic loader to enable MTE protection for the heap
  --android-memtag-mode=<value>
                          Instruct the dynamic loader to start under MTE mode {async, sync, none}
  --android-memtag-stack  Instruct the dynamic loader to prepare for MTE stack instrumentation
  --apply-dynamic-relocs  Apply link-time values for dynamic relocations
  --as-needed             Only set DT_NEEDED for shared libraries if used
  --auxiliary=<value>     Set DT_AUXILIARY field to the specified name
  --Bdynamic              Link against shared libraries (default)
  --Bno-symbolic          Don't bind default visibility defined symbols locally for -shared (default)
  --Bshareable            Alias for --shared
  --Bstatic               Do not link against shared libraries
  --Bsymbolic-functions   Bind default visibility defined function symbols locally for -shared
  --Bsymbolic-non-weak-functions
                          Bind default visibility defined STB_GLOBAL function symbols locally for -shared
  --Bsymbolic             Bind default visibility defined symbols locally for -shared
  --build-id=[fast,md5,sha1,uuid,0x<hexstring>]
                          Generate build ID note
  --build-id              Alias for --build-id=fast
  -b <value>              Alias for --format
  --call-graph-ordering-file=<value>
                          Layout sections to optimize the given callgraph
  --call-graph-profile-sort
                          Reorder sections with call graph profile (default)
  --call_shared           Alias for --Bdynamic
  --check-sections        Check section addresses for overlaps (default)
  --color-diagnostics=[auto,always,never]
                          Use colors in diagnostics (default: auto)
  --color-diagnostics     Alias for --color-diagnostics=always
  --compress-debug-sections=[none,zlib,zstd]
                          Compress DWARF debug sections
  --cref                  Output cross reference table. If -Map is specified, print to the map file
  --defsym=<symbol>=<value>
                          Define a symbol alias
  --demangle              Demangle symbol names (default)
  --dependency-file=<file>
                          Write a dependency file
  --dependent-libraries   Process dependent library specifiers from input files (default)
  --disable-new-dtags     Disable new dynamic tags
  --discard-all           Delete all local symbols
  --discard-locals        Delete temporary local symbols
  --discard-none          Keep all symbols in the symbol table
  --dn                    Alias for --Bstatic
  --dynamic-linker=<value>
                          Which dynamic linker to use
  --dynamic-list=<file>   Similar to --export-dynamic-symbol-list. When creating a shared object, this additionally implies -Bsymbolic but does not set DF_SYMBOLIC
  --dy                    Alias for --Bdynamic
  --EB                    Select the big-endian format in OUTPUT_FORMAT
  --eh-frame-hdr          Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header
  --EL                    Select the little-endian format in OUTPUT_FORMAT
  --emit-relocs           Generate relocations in output
  --enable-new-dtags      Enable new dynamic tags (default)
  --end-group             Ignored for compatibility with GNU unless you pass --warn-backrefs
  --end-lib               End a grouping of objects that should be treated as if they were together in an archive
  --entry=<entry>         Name of entry point symbol
  --error-handling-script=<value>
                          Specify an error handling script
  --error-limit=<value>   Maximum number of errors to emit before stopping (0 = no limit)
  --error-unresolved-symbols
                          Report unresolved symbols as errors
  --exclude-libs=<value>  Exclude static libraries from automatic export
  --execute-only          Mark executable sections unreadable
  --export-dynamic-symbol-list=file
                          Read a list of dynamic symbol patterns. Apply --export-dynamic-symbol on each pattern
  --export-dynamic-symbol=glob
                          (executable) Put matched symbols in the dynamic symbol table. (shared object) References to matched non-local STV_DEFAULT symbols shouldn't be bound to definitions within the shared object. Does not imply -Bsymbolic.
  --export-dynamic        Put symbols in the dynamic symbol table
  -E                      Alias for --export-dynamic
  -e <value>              Alias for --entry
  --fatal-warnings        Treat warnings as errors
  --filter=<value>        Set DT_FILTER field to the specified name
  --fini=<symbol>         Specify a finalizer function
  --fix-cortex-a53-843419 Apply fixes for AArch64 Cortex-A53 erratum 843419
  --fix-cortex-a8         Apply fixes for ARM Cortex-A8 erratum 657417
  --format=[default,elf,binary]
                          Change the input format of the inputs following this option
  --fortran-common        Search archive members for definitions to override COMMON symbols (default)
  -F <value>              Alias for --filter
  -f <value>              Alias for --auxiliary
  --gc-sections           Enable garbage collection of unused sections
  --gdb-index             Generate .gdb_index section
  --gnu-unique            Enable STB_GNU_UNIQUE symbol binding (default)
  --hash-style=<value>    Specify hash style (sysv, gnu or both)
  --help                  Print option help
  -h <value>              Alias for --soname
  --icf=all               Enable identical code folding
  --icf=none              Disable identical code folding (default)
  --icf=safe              Enable safe identical code folding
  --ignore-data-address-equality
                          lld can break the address equality of data
  --ignore-function-address-equality
                          lld can break the address equality of functions
  --image-base=<value>    Set the base address
  --init=<symbol>         Specify an initializer function
  --just-symbols=<value>  Just link symbols
  --keep-unique=<value>   Do not fold this symbol during ICF
  --library-path=<value>  Add <dir> to the library search path
  --library-path <value>  Add <dir> to the library search path
  --library=<value>       Search for library <libname>
  --library <value>       Search for library <libname>
  --load-pass-plugin=<value>
                          Load passes from plugin library
  --lto-aa-pipeline=<value>
                          AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes
  --lto-basic-block-sections=<value>
                          Enable basic block sections for LTO
  --lto-cs-profile-file=<value>
                          Context sensitive profile file path
  --lto-cs-profile-generate
                          Perform context sensitive PGO instrumentation
  --lto-debug-pass-manager
                          Debug new pass manager
  --lto-emit-asm          Emit assembly code
  --lto-newpm-passes=<value>
                          Passes to run during LTO
  --lto-O<opt-level>      Optimization level for LTO
  --lto-partitions=<value>
                          Number of LTO codegen partitions
  --lto-pgo-warn-mismatch turn on warnings about profile cfg mismatch (default)>
  --lto-sample-profile=<value>
                          Sample profile file path
  --lto-unique-basic-block-section-names
                          Give unique names to every basic block section for LTO
  --lto-whole-program-visibility
                          Asserts that the LTO link has whole program visibility
  -L <dir>                Add <dir> to the library search path
  -l <libname>            Search for library <libname>
  --Map=<value>           Print a link map to the specified file
  --merge-exidx-entries   Enable merging .ARM.exidx entries (default)
  --mllvm=<value>         Additional arguments to forward to LLVM's option processing
  --mmap-output-file      Mmap the output file for writing (default)
  -M                      Alias for --print-map
  -m <value>              Set target emulation
  --nmagic                Do not page align sections, link against static libraries.
  --no-allow-multiple-definition
                          Do not allow multiple definitions (default)
  --no-allow-shlib-undefined
                          Do not allow unresolved references in shared libraries (default when linking an executable)
  --no-apply-dynamic-relocs
                          Do not apply link-time values for dynamic relocations (default)
  --no-as-needed          Always set DT_NEEDED for shared libraries (default)
  --no-call-graph-profile-sort
                          Do not reorder sections with call graph profile
  --no-check-sections     Do not check section addresses for overlaps
  --no-color-diagnostics  Alias for --color-diagnostics=never
  --no-demangle           Do not demangle symbol names
  --no-dependent-libraries
                          Ignore dependent library specifiers from input files
  --no-dynamic-linker     Inhibit output of .interp section
  --no-eh-frame-hdr       Do not create .eh_frame_hdr section
  --no-execute-only       Mark executable sections readable (default)
  --no-export-dynamic     Do not put symbols in the dynamic symbol table (default)
  --no-fatal-warnings     Do not treat warnings as errors (default)
  --no-fortran-common     Do not search archive members for definitions to override COMMON symbols
  --no-gc-sections        Disable garbage collection of unused sections (default)
  --no-gdb-index          Do not generate .gdb_index section (default)
  --no-gnu-unique         Disable STB_GNU_UNIQUE symbol binding
  --no-lto-legacy-pass-manager
                          Use the new pass manager in LLVM
  --no-lto-pgo-warn-mismatch
                          turn off warnings about profile cfg mismatch
  --no-lto-unique-basic-block-section-names
                          Do not give unique names to every basic block section for LTO (default)
  --no-lto-whole-program-visibility
                          Asserts that the LTO link does not have whole program visibility
  --no-merge-exidx-entries
                          Disable merging .ARM.exidx entries
  --no-mmap-output-file   Do not mmap the output file for writing
  --no-nmagic             Page align sections (default)
  --no-omagic             Do not set the text data sections to be writable, page align sections (default)
  --no-optimize-bb-jumps  Do not remove any direct jumps at the end to the next basic block (default)
  --no-pcrel-optimize     (PowerPC64) Disable PC-relative optimizations
  --no-pie                Do not create a position independent executable (default)
  --no-power10-stubs      Alias for --power10-stubs=no
  --no-print-gc-sections  Do not list removed unused sections (default)
  --no-print-icf-sections Do not list identical folded sections (default)
  --no-relax              Disable target-specific relaxations
  --no-rosegment          Do not put read-only non-executable sections in their own segment
  --no-toc-optimize       (PowerPC64) Disable TOC related optimizations
  --no-undefined-version  Report version scripts that refer undefined symbols
  --no-undefined          Report unresolved symbols even if the linker is creating a shared library
  --no-use-android-relr-tags
                          Use SHT_RELR / DT_RELR* tags (default)
  --no-warn-backrefs      Do not warn about backward symbol references to extract archive members (default)
  --no-warn-common        Do not warn about duplicate common symbols (default)
  --no-warn-ifunc-textrel Do not warn about using ifunc symbols with text relocations (default)
  --no-warn-symbol-ordering
                          Do not warn about problems with the symbol ordering file
  --no-whole-archive      Do not force load of all members in a static library (default)
  --noinhibit-exec        Retain the executable output file whenever it is still usable
  --non_shared            Alias for --Bstatic
  --nostdlib              Only search directories specified on the command line
  -N                      Alias for --omagic
  -n                      Alias for --nmagic
  --oformat=[elf,binary]  Specify the binary format for the output object file
  --omagic                Set the text and data sections to be readable and writable, do not page align sections, link against static libraries
  --opt-remarks-filename <value>
                          YAML output file for optimization remarks
  --opt-remarks-format <value>
                          The format used for serializing remarks (default: YAML)
  --opt-remarks-hotness-threshold=<value>
                          Minimum profile count required for an optimization remark to be output. Use 'auto' to apply the threshold from profile summary.
  --opt-remarks-passes <value>
                          Regex for the passes that need to be serialized to the output file
  --opt-remarks-with-hotness
                          Include hotness information in the optimization remarks file
  --optimize-bb-jumps     Remove direct jumps at the end to the next basic block
  --orphan-handling=<value>
                          Control how orphan sections are handled when linker script used
  --output=<value>        Alias for -o
  --output <value>        Alias for -o
  -O <value>              Optimize output file size
  -o <path>               Path to file to write output
  --pack-dyn-relocs=[none,android,relr,android+relr]
                          Pack dynamic relocations in the given format
  --package-metadata=<value>
                          Emit package metadata note
  --pcrel-optimize        (PowerPC64) Enable PC-relative optimizations (default)
  --pic-executable        Alias for --pie
  --pic-veneer            Always generate position independent thunks (veneers)
  --pie                   Create a position independent executable
  --plugin-opt=-<value>   Specify an LLVM option for compatibility with LLVMgold.so
  --plugin-opt=cs-profile-generate
                          Alias for --lto-cs-profile-generate
  --plugin-opt=cs-profile-path=<value>
                          Alias for --lto-cs-profile-file
  --plugin-opt=debug-pass-manager
                          Alias for --lto-debug-pass-manager
  --plugin-opt=disable-verify
                          Alias for --disable-verify
  --plugin-opt=dwo_dir=<value>
                          Directory to store .dwo files when LTO and debug fission are used
  --plugin-opt=emit-asm   Alias for --lto-emit-asm
  --plugin-opt=jobs=<value>
                          Alias for --thinlto-jobs
  --plugin-opt=lto-partitions=<value>
                          Alias for --lto-partitions
  --plugin-opt=new-pass-manager
                          Alias for --no-lto-legacy-pass-manager
  --plugin-opt=no-opaque-pointers
                          Use typed pointers in IR during LTO
  --plugin-opt=obj-path=<value>
                          Alias for --lto-obj-path=
  --plugin-opt=opaque-pointers
                          Use opaque pointers in IR during LTO (default)
  --plugin-opt=opt-remarks-filename=<value>
                          Alias for --opt-remarks-filename
  --plugin-opt=opt-remarks-format=<value>
                          Alias for --opt-remarks-format
  --plugin-opt=opt-remarks-hotness-threshold=<value>
                          Alias for --opt-remarks-hotness-threshold
  --plugin-opt=opt-remarks-passes=<value>
                          Alias for --opt-remarks-passes
  --plugin-opt=opt-remarks-with-hotness
                          Alias for --opt-remarks-with_hotness
  --plugin-opt=O<value>   Alias for --lto-O
  --plugin-opt=sample-profile=<value>
                          Alias for --lto-sample-profile
  --plugin-opt=save-temps Alias for --save-temps
  --plugin-opt=stats-file=<value>
                          Filename to write LTO statistics to
  --plugin-opt=thinlto-emit-imports-files
                          Alias for --thinlto-emit-imports-files
  --plugin-opt=thinlto-index-only=<value>
                          Alias for --thinlto-index-only=
  --plugin-opt=thinlto-index-only
                          Alias for --thinlto-index-only
  --plugin-opt=thinlto-object-suffix-replace=<value>
                          Alias for --thinlto-object-suffix-replace=
  --plugin-opt=thinlto-prefix-replace=<value>
                          Alias for --thinlto-prefix-replace=
  --plugin=<value>        Ignored for compatibility with GNU linkers
  --pop-state             Restore the states saved by --push-state
  --power10-stubs=<mode>  Whether to use Power10 instructions in call stubs for R_PPC64_REL24_NOTOC and TOC/NOTOC interworking (yes (default): use; no: don't use). "auto" is currently the same as "yes"
  --power10-stubs         Alias for --power10-stubs=auto
  --print-archive-stats=<value>
                          Write archive usage statistics to the specified file. Print the numbers of members and extracted members for each archive
  --print-gc-sections     List removed unused sections
  --print-icf-sections    List identical folded sections
  --print-map             Print a link map to the standard output
  --print-symbol-order=<value>
                          Print a symbol order specified by --call-graph-ordering-file into the specified file
  --push-state            Save the current state of --as-needed, -static and --whole-archive
  -q                      Alias for --emit-relocs
  --relax                 Enable target-specific relaxations if supported (default)
  --relocatable           Create relocatable object file
  --reproduce=<value>     Write tar file containing inputs and command to reproduce link
  --retain-symbols-file=<file>
                          Retain only the symbols listed in the file
  --rosegment             Put read-only non-executable sections in their own segment (default)
  --rpath=<value>         Add a DT_RUNPATH to the output
  --rsp-quoting=[posix,windows]
                          Quoting style for response files
  -R <value>              Alias for --rpath
  -r                      Alias for --relocatable
  --save-temps=<value>    Save select intermediate LTO compilation results
  --save-temps            Save intermediate LTO compilation results
  --script=<value>        Read linker script
  --section-start=<address>
                          Set address of section
  --shared                Build a shared object
  --shuffle-sections=<section-glob>=<seed>
                          Shuffle matched sections using the given seed before mapping them to the output sections. If -1, reverse the section order. If 0, use a random seed
  --soname=<value>        Set DT_SONAME
  --sort-section=<value>  Specifies sections sorting rule when linkerscript is used
  --split-stack-adjust-size=<value>
                          Specify adjustment to stack size when a split-stack function calls a non-split-stack function
  --start-group           Ignored for compatibility with GNU unless you pass --warn-backrefs
  --start-lib             Start a grouping of objects that should be treated as if they were together in an archive
  --static                Alias for --Bstatic
  --strip-all             Strip all symbols. Implies --strip-debug
  --strip-debug           Strip debugging information
  --symbol-ordering-file=<value>
                          Layout sections to place symbols in the order specified by symbol ordering file
  --sysroot=<value>       Set the system root
  -S                      Alias for --strip-debug
  -s                      Alias for --strip-all
  --target1-abs           Interpret R_ARM_TARGET1 as R_ARM_ABS32 (default)
  --target1-rel           Interpret R_ARM_TARGET1 as R_ARM_REL32
  --target2=<type>        Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel
  --Tbss=<value>          Same as --section-start with .bss as the sectionname
  --Tdata=<value>         Same as --section-start with .data as the sectionname
  --thinlto-cache-dir=<value>
                          Path to ThinLTO cached object file directory
  --thinlto-cache-policy=<value>
                          Pruning policy for the ThinLTO cache
  --thinlto-jobs=<value>  Number of ThinLTO jobs. Default to --threads=
  --thinlto-single-module=<value>
                          Specific a single module to compile in ThinLTO mode, for debugging only
  --threads=<value>       Number of threads. '1' disables multi-threading. By default all available hardware threads are used
  --time-trace-granularity=<value>
                          Minimum time granularity (in microseconds) traced by time profiler
  --time-trace=<file>     Record time trace to <file>
  --time-trace            Record time trace to file next to output
  --toc-optimize          (PowerPC64) Enable TOC related optimizations (default)
  --trace-symbol=<value>  Trace references to symbols
  --trace                 Print the names of the input files
  --Ttext=<value>         Same as --section-start with .text as the sectionname
  -T <value>              Alias for --script
  -t                      Alias for --trace
  --undefined-glob=<pattern>
                          Force undefined symbol during linking
  --undefined-version     Allow unused version in version script (disabled by default)
  --undefined=<symbol>    Force undefined symbol during linking
  --unique                Creates a separate output section for every orphan input section
  --unresolved-symbols=<value>
                          Determine how to handle unresolved symbols
  --use-android-relr-tags Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*
  -u <value>              Alias for --undefined
  --verbose               Verbose mode
  --version-script=<value>
                          Read a version script
  --version               Display the version number and exit
  --vs-diagnostics        Format diagnostics for Visual Studio compatibility
  -V                      Alias for -v
  -v                      Display the version number
  --warn-backrefs-exclude=<glob>
                          Glob describing an archive (or an object file within --start-lib) which should be ignored for --warn-backrefs.
  --warn-backrefs         Warn about backward symbol references to extract archive members
  --warn-common           Warn about duplicate common symbols
  --warn-ifunc-textrel    Warn about using ifunc symbols with text relocations
  --warn-symbol-ordering  Warn about problems with the symbol ordering file (default)
  --warn-unresolved-symbols
                          Report unresolved symbols as warnings
  --whole-archive         Force load of all members in a static library
  --why-extract=<value>   Print to a file about why archive members are extracted
  --wrap=<symbol>         Redirect symbol references to __wrap_symbol and __real_symbol references to symbol
  -X                      Alias for --discard-locals
  -x                      Alias for --discard-all
  -y <value>              Alias for --trace-symbol
  -z <option>             Linker option extensions

/usr/bin/ld.lld: supported targets: elf
Options (242)
OptionDescriptionSource
--allow-multiple-definitionAllow multiple definitionshelp
--android-memtag-heapInstruct the dynamic loader to enable MTE protection for the heaphelp
--android-memtag-mode valueInstruct the dynamic loader to start under MTE mode {async, sync, none}help
--android-memtag-stackInstruct the dynamic loader to prepare for MTE stack instrumentationhelp
--apply-dynamic-relocsApply link-time values for dynamic relocationshelp
--as-neededOnly set DT_NEEDED for shared libraries if usedhelp
--auxiliary valueSet DT_AUXILIARY field to the specified namehelp
--BdynamicLink against shared libraries (default)help
--Bno-symbolicDon't bind default visibility defined symbols locally for -shared (default)help
--BshareableAlias for --sharedhelp
--BstaticDo not link against shared librarieshelp
--Bsymbolic-functionsBind default visibility defined function symbols locally for -sharedhelp
--Bsymbolic-non-weak-functionsBind default visibility defined STB_GLOBAL function symbols locally for -sharedhelp
--BsymbolicBind default visibility defined symbols locally for -sharedhelp
--build-id fastGenerate build ID notehelp
-b valueAlias for --formathelp
--call-graph-ordering-file valueLayout sections to optimize the given callgraphhelp
--call-graph-profile-sortReorder sections with call graph profile (default)help
--call_sharedAlias for --Bdynamichelp
--check-sectionsCheck section addresses for overlaps (default)help
--color-diagnostics autoUse colors in diagnostics (default: auto)help
--compress-debug-sections noneCompress DWARF debug sectionshelp
--crefOutput cross reference table.help
--defsym symbol>=<valueDefine a symbol aliashelp
--demangleDemangle symbol names (default)help
--dependency-file fileWrite a dependency filehelp
--dependent-librariesProcess dependent library specifiers from input files (default)help
--disable-new-dtagsDisable new dynamic tagshelp
--discard-allDelete all local symbolshelp
--discard-localsDelete temporary local symbolshelp
--discard-noneKeep all symbols in the symbol tablehelp
--dnAlias for --Bstatichelp
--dynamic-linker valueWhich dynamic linker to usehelp
--dynamic-list fileSimilar to --export-dynamic-symbol-list.help
--dyAlias for --Bdynamichelp
--EBSelect the big-endian format in OUTPUT_FORMAThelp
--eh-frame-hdrRequest creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment headerhelp
--ELSelect the little-endian format in OUTPUT_FORMAThelp
--emit-relocsGenerate relocations in outputhelp
--enable-new-dtagsEnable new dynamic tags (default)help
--end-groupIgnored for compatibility with GNU unless you pass --warn-backrefshelp
--end-libEnd a grouping of objects that should be treated as if they were together in an archivehelp
--entry entryName of entry point symbolhelp
--error-handling-script valueSpecify an error handling scripthelp
--error-limit valueMaximum number of errors to emit before stopping (0 = no limit)help
--error-unresolved-symbolsReport unresolved symbols as errorshelp
--exclude-libs valueExclude static libraries from automatic exporthelp
--execute-onlyMark executable sections unreadablehelp
--export-dynamic-symbol-list fileRead a list of dynamic symbol patterns.help
--export-dynamic-symbol glob(executable) Put matched symbols in the dynamic symbol table.help
--export-dynamicPut symbols in the dynamic symbol tablehelp
-EAlias for --export-dynamichelp
-e valueAlias for --entryhelp
--fatal-warningsTreat warnings as errorshelp
--filter valueSet DT_FILTER field to the specified namehelp
--fini symbolSpecify a finalizer functionhelp
--fix-cortex-a8Apply fixes for ARM Cortex-A8 erratum 657417help
--format defaultChange the input format of the inputs following this optionhelp
--fortran-commonSearch archive members for definitions to override COMMON symbols (default)help
-F valueAlias for --filterhelp
-f valueAlias for --auxiliaryhelp
--gc-sectionsEnable garbage collection of unused sectionshelp
--gdb-indexGenerate .gdb_index sectionhelp
--gnu-uniqueEnable STB_GNU_UNIQUE symbol binding (default)help
--hash-style valueSpecify hash style (sysv, gnu or both)help
--helpPrint option helphelp
-h valueAlias for --sonamehelp
--icf allEnable identical code foldinghelp
--ignore-data-address-equalitylld can break the address equality of datahelp
--ignore-function-address-equalitylld can break the address equality of functionshelp
--image-base valueSet the base addresshelp
--init symbolSpecify an initializer functionhelp
--just-symbols valueJust link symbolshelp
--keep-unique valueDo not fold this symbol during ICFhelp
--library-path valueAdd <dir> to the library search pathhelp
--library valueSearch for library <libname>help
--load-pass-plugin valueLoad passes from plugin libraryhelp
--lto-aa-pipeline valueAA pipeline to run during LTO.help
--lto-basic-block-sections valueEnable basic block sections for LTOhelp
--lto-cs-profile-file valueContext sensitive profile file pathhelp
--lto-cs-profile-generatePerform context sensitive PGO instrumentationhelp
--lto-debug-pass-managerDebug new pass managerhelp
--lto-emit-asmEmit assembly codehelp
--lto-newpm-passes valuePasses to run during LTOhelp
--lto-O opt-levelOptimization level for LTOhelp
--lto-partitions valueNumber of LTO codegen partitionshelp
--lto-sample-profile valueSample profile file pathhelp
--lto-unique-basic-block-section-namesGive unique names to every basic block section for LTOhelp
--lto-whole-program-visibilityAsserts that the LTO link has whole program visibilityhelp
-L dirAdd <dir> to the library search pathhelp
-l libnameSearch for library <libname>help
--Map valuePrint a link map to the specified filehelp
--merge-exidx-entriesEnable merging .ARM.exidx entries (default)help
--mllvm valueAdditional arguments to forward to LLVM's option processinghelp
--mmap-output-fileMmap the output file for writing (default)help
-MAlias for --print-maphelp
-m valueSet target emulationhelp
--nmagicDo not page align sections, link against static libraries.help
--no-allow-multiple-definitionDo not allow multiple definitions (default)help
--no-allow-shlib-undefinedDo not allow unresolved references in shared libraries (default when linking an executable)help
--no-apply-dynamic-relocsDo not apply link-time values for dynamic relocations (default)help
--no-as-neededAlways set DT_NEEDED for shared libraries (default)help
--no-call-graph-profile-sortDo not reorder sections with call graph profilehelp
--no-check-sectionsDo not check section addresses for overlapshelp
--no-color-diagnosticsAlias for --color-diagnostics=neverhelp
--no-demangleDo not demangle symbol nameshelp
--no-dependent-librariesIgnore dependent library specifiers from input fileshelp
--no-dynamic-linkerInhibit output of .interp sectionhelp
--no-eh-frame-hdrDo not create .eh_frame_hdr sectionhelp
--no-execute-onlyMark executable sections readable (default)help
--no-export-dynamicDo not put symbols in the dynamic symbol table (default)help
--no-fatal-warningsDo not treat warnings as errors (default)help
--no-fortran-commonDo not search archive members for definitions to override COMMON symbolshelp
--no-gc-sectionsDisable garbage collection of unused sections (default)help
--no-gdb-indexDo not generate .gdb_index section (default)help
--no-gnu-uniqueDisable STB_GNU_UNIQUE symbol bindinghelp
--no-lto-legacy-pass-managerUse the new pass manager in LLVMhelp
--no-lto-pgo-warn-mismatchturn off warnings about profile cfg mismatchhelp
--no-lto-unique-basic-block-section-namesDo not give unique names to every basic block section for LTO (default)help
--no-lto-whole-program-visibilityAsserts that the LTO link does not have whole program visibilityhelp
--no-merge-exidx-entriesDisable merging .ARM.exidx entrieshelp
--no-mmap-output-fileDo not mmap the output file for writinghelp
--no-nmagicPage align sections (default)help
--no-omagicDo not set the text data sections to be writable, page align sections (default)help
--no-optimize-bb-jumpsDo not remove any direct jumps at the end to the next basic block (default)help
--no-pcrel-optimize(PowerPC64) Disable PC-relative optimizationshelp
--no-pieDo not create a position independent executable (default)help
--no-power10-stubsAlias for --power10-stubs=nohelp
--no-print-gc-sectionsDo not list removed unused sections (default)help
--no-relaxDisable target-specific relaxationshelp
--no-rosegmentDo not put read-only non-executable sections in their own segmenthelp
--no-toc-optimize(PowerPC64) Disable TOC related optimizationshelp
--no-undefined-versionReport version scripts that refer undefined symbolshelp
--no-undefinedReport unresolved symbols even if the linker is creating a shared libraryhelp
--no-use-android-relr-tagsUse SHT_RELR / DT_RELR* tags (default)help
--no-warn-backrefsDo not warn about backward symbol references to extract archive members (default)help
--no-warn-commonDo not warn about duplicate common symbols (default)help
--no-warn-symbol-orderingDo not warn about problems with the symbol ordering filehelp
--no-whole-archiveDo not force load of all members in a static library (default)help
--noinhibit-execRetain the executable output file whenever it is still usablehelp
--non_sharedAlias for --Bstatichelp
--nostdlibOnly search directories specified on the command linehelp
-NAlias for --omagichelp
-nAlias for --nmagichelp
--oformat elfSpecify the binary format for the output object filehelp
--omagicSet the text and data sections to be readable and writable, do not page align sections, link against static librarieshelp
--opt-remarks-filename valueYAML output file for optimization remarkshelp
--opt-remarks-format valueThe format used for serializing remarks (default: YAML)help
--opt-remarks-hotness-threshold valueMinimum profile count required for an optimization remark to be output.help
--opt-remarks-passes valueRegex for the passes that need to be serialized to the output filehelp
--opt-remarks-with-hotnessInclude hotness information in the optimization remarks filehelp
--optimize-bb-jumpsRemove direct jumps at the end to the next basic blockhelp
--orphan-handling valueControl how orphan sections are handled when linker script usedhelp
--output valueAlias for -ohelp
-O valueOptimize output file sizehelp
-o pathPath to file to write outputhelp
--pack-dyn-relocs nonePack dynamic relocations in the given formathelp
--package-metadata valueEmit package metadata notehelp
--pcrel-optimize(PowerPC64) Enable PC-relative optimizations (default)help
--pic-executableAlias for --piehelp
--pic-veneerAlways generate position independent thunks (veneers)help
--pieCreate a position independent executablehelp
--plugin-opt -<valueSpecify an LLVM option for compatibility with LLVMgold.sohelp
--plugin valueIgnored for compatibility with GNU linkershelp
--pop-stateRestore the states saved by --push-statehelp
--power10-stubs modeWhether to use Power10 instructions in call stubs for R_PPC64_REL24_NOTOC and TOC/NOTOC interworking (yes (default): use;help
--print-archive-stats valueWrite archive usage statistics to the specified file.help
--print-gc-sectionsList removed unused sectionshelp
--print-icf-sectionsList identical folded sectionshelp
--print-mapPrint a link map to the standard outputhelp
--print-symbol-order valuePrint a symbol order specified by --call-graph-ordering-file into the specified filehelp
--push-stateSave the current state of --as-needed, -static and --whole-archivehelp
-qAlias for --emit-relocshelp
--relaxEnable target-specific relaxations if supported (default)help
--relocatableCreate relocatable object filehelp
--reproduce valueWrite tar file containing inputs and command to reproduce linkhelp
--retain-symbols-file fileRetain only the symbols listed in the filehelp
--rosegmentPut read-only non-executable sections in their own segment (default)help
--rpath valueAdd a DT_RUNPATH to the outputhelp
--rsp-quoting posixQuoting style for response fileshelp
-R valueAlias for --rpathhelp
-rAlias for --relocatablehelp
--save-temps valueSave select intermediate LTO compilation resultshelp
--script valueRead linker scripthelp
--section-start addressSet address of sectionhelp
--sharedBuild a shared objecthelp
--shuffle-sections section-glob>=<seedShuffle matched sections using the given seed before mapping them to the output sections.help
--soname valueSet DT_SONAMEhelp
--sort-section valueSpecifies sections sorting rule when linkerscript is usedhelp
--split-stack-adjust-size valueSpecify adjustment to stack size when a split-stack function calls a non-split-stack functionhelp
--start-groupIgnored for compatibility with GNU unless you pass --warn-backrefshelp
--start-libStart a grouping of objects that should be treated as if they were together in an archivehelp
--staticAlias for --Bstatichelp
--strip-allStrip all symbols.help
--strip-debugStrip debugging informationhelp
--symbol-ordering-file valueLayout sections to place symbols in the order specified by symbol ordering filehelp
--sysroot valueSet the system roothelp
-SAlias for --strip-debughelp
-sAlias for --strip-allhelp
--target1-absInterpret R_ARM_TARGET1 as R_ARM_ABS32 (default)help
--target1-relInterpret R_ARM_TARGET1 as R_ARM_REL32help
--target2 typeInterpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-relhelp
--Tbss valueSame as --section-start with .bss as the sectionnamehelp
--Tdata valueSame as --section-start with .data as the sectionnamehelp
--thinlto-cache-dir valuePath to ThinLTO cached object file directoryhelp
--thinlto-cache-policy valuePruning policy for the ThinLTO cachehelp
--thinlto-jobs valueNumber of ThinLTO jobs.help
--thinlto-single-module valueSpecific a single module to compile in ThinLTO mode, for debugging onlyhelp
--threads valueNumber of threads.help
--time-trace-granularity valueMinimum time granularity (in microseconds) traced by time profilerhelp
--time-trace fileRecord time trace to <file>help
--toc-optimize(PowerPC64) Enable TOC related optimizations (default)help
--trace-symbol valueTrace references to symbolshelp
--tracePrint the names of the input fileshelp
--Ttext valueSame as --section-start with .text as the sectionnamehelp
-T valueAlias for --scripthelp
-tAlias for --tracehelp
--undefined-glob patternForce undefined symbol during linkinghelp
--undefined-versionAllow unused version in version script (disabled by default)help
--undefined symbolForce undefined symbol during linkinghelp
--uniqueCreates a separate output section for every orphan input sectionhelp
--unresolved-symbols valueDetermine how to handle unresolved symbolshelp
-u valueAlias for --undefinedhelp
--verboseVerbose modehelp
--version-script valueRead a version scripthelp
--versionDisplay the version number and exithelp
--vs-diagnosticsFormat diagnostics for Visual Studio compatibilityhelp
-VAlias for -vhelp
-vDisplay the version numberhelp
--warn-backrefs-exclude globGlob describing an archive (or an object file within --start-lib) which should be ignored for --warn-backrefs.help
--warn-backrefsWarn about backward symbol references to extract archive membershelp
--warn-commonWarn about duplicate common symbolshelp
--warn-ifunc-textrelWarn about using ifunc symbols with text relocationshelp
--warn-symbol-orderingWarn about problems with the symbol ordering file (default)help
--warn-unresolved-symbolsReport unresolved symbols as warningshelp
--whole-archiveForce load of all members in a static libraryhelp
--why-extract valuePrint to a file about why archive members are extractedhelp
--wrap symbolRedirect symbol references to __wrap_symbol and __real_symbol references to symbolhelp
-XAlias for --discard-localshelp
-xAlias for --discard-allhelp
-y valueAlias for --trace-symbolhelp
-z optionLinker option extensionshelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.