Scroll to navigation

LD.LLD(1) User Commands LD.LLD(1)


ld.lld - manual page for ld.lld 5.0



USAGE: build-llvm/bin/ld.lld [options] <inputs>


Allow multiple definitions
Only set DT_NEEDED for shared libraries if used
Set DT_AUXILIARY field to the specified name
Link against shared libraries
Do not link against shared libraries
Bind defined function symbols locally
Bind defined symbols locally
Generate build ID note
Generate build ID note
Use colors in diagnostics
Use colors in diagnostics
Compress DWARF debug sections
Assign space to common symbols
Define a symbol alias
Demangle symbol names
Disable new dynamic tags
Delete all local symbols
Delete temporary local symbols
Keep all symbols in the symbol table
Which dynamic linker to use
Read a list of dynamic symbols
Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header
Generate relocations in output
Enable new dynamic tags
End a grouping of objects that should be treated as if they were together in an archive
Name of entry point symbol
Maximum number of errors to emit before stopping (0 = no limit)
Report unresolved symbols as errors
Exclude static libraries from automatic export
Put a symbol in the dynamic symbol table
Put symbols in the dynamic symbol table
Treat warnings as errors
Set DT_FILTER field to the specified name
Specify a finalizer function

--format=<input-format> Change the input format of the inputs following this option

Perform a full shutdown instead of calling _exit
Enable garbage collection of unused sections
Generate .gdb_index section
Specify hash style (sysv, gnu or both)
Print option help
Enable identical code folding
Disable identical code folding
Set the base address
Specify an initializer function
AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes
Passes to run during LTO
Optimization level for LTO
Number of LTO codegen partitions
Add a directory to the library search path
Root name of library to use
Print a link map to the specified file
Set target emulation
Always DT_NEEDED for shared libraries
Do not use colors in diagnostics
Do not assign space to common symbols
Do not demangle symbol names
Inhibit output of .interp section
Disable garbage collection of unused sections
Disable STB_GNU_UNIQUE symbol binding
Do not put read-only non-executable sections in their own segment
Do not run the linker multi-threaded
Report version scripts that refer undefined symbols
Report unresolved symbols even if the linker is creating a shared library
Restores the default behavior of loading archive members
Retain the executable output file whenever it is still usable
Do not create a position independent executable
Only search directories specified on the command line
Specify the binary format for the output object file
Set the text and data sections to be readable and writable
YAML output file for optimization remarks
Include hotness informations in the optimization remarks file
Optimize output file size
Path to file to write output
Create a position independent executable
List removed unused sections
Print a link map to the standard output
Create relocatable object file
Dump linker invocation and input files for debugging
Retain only the symbols listed in the file
Add a DT_RUNPATH to the output
Quoting style for response files. Values supported: windows|posix
Read linker script
Set address of section
Build a shared object
Specifies sections sorting rule when linkerscript is used
Start a grouping of objects that should be treated as if they were together in an archive
Strip all symbols
Strip debugging information
Layout sections in the order specified by symbol file
Set the system root
Interpret R_ARM_TARGET1 as R_ARM_ABS32
Interpret R_ARM_TARGET1 as R_ARM_REL32
Interpret R_ARM_TARGET2 as <type>, where <type> is one of rel, abs, or got-rel
Same as --section-start with .bss as the sectionname
Same as --section-start with .data as the sectionname
Path to ThinLTO cached object file directory
Pruning policy for the ThinLTO cache
Number of ThinLTO jobs
Run the linker multi-threaded
Trace references to symbols
Print the names of the input files
Same as --section-start with .text as the sectionname
Force undefined symbol during linking
Determine how to handle unresolved symbols
Verbose mode
Read a version script
Display the version number and exit
Display the version number
Warn about duplicate common symbols
Report unresolved symbols as warnings
Force load of all members in a static library
Use wrapper functions for symbol
Linker option extensions

build-llvm/bin/ld.lld: supported targets: elf32-i386 elf32-iamcu elf32-littlearm elf32-ntradbigmips elf32-ntradlittlemips elf32-powerpc elf32-tradbigmips elf32-tradlittlemips elf32-x86-64 elf64-amdgpu elf64-littleaarch64 elf64-powerpc elf64-tradbigmips elf64-tradlittlemips elf64-x86-64


The full documentation for ld.lld is maintained as a Texinfo manual. If the info and ld.lld programs are properly installed at your site, the command

info ld.lld

should give you access to the complete manual.

March 2018 ld.lld 5.0