OS Manuals

/usr/bin/ld.gold

binutils (gold linker)

From binutils-gold 2.47-r4 (os), captured 2026-11-10 by running ld.gold --help (exit 0). permalink

Usage: /usr/bin/ld.gold [options] file...
Options:
  --help                      Report usage information
  -v, --version               Report version information
  -V                          Report version and target information
  --add-needed                Not supported
  --no-add-needed             Do not copy DT_NEEDED tags from shared libraries (default)
  --allow-multiple-definition Allow multiple definitions of symbols
  --no-allow-multiple-definition
                              Do not allow multiple definitions (default)
  --allow-shlib-undefined     Allow unresolved references in shared libraries
  --no-allow-shlib-undefined  Do not allow unresolved references in shared libraries (default)
  --apply-dynamic-relocs      Apply link-time values for dynamic relocations (default)
  --no-apply-dynamic-relocs   (aarch64 only) Do not apply link-time values for dynamic relocations
  --as-needed                 Use DT_NEEDED only for shared libraries that are used
  --no-as-needed              Use DT_NEEDED for all shared libraries (default)
  -assert [ignored]           Ignored
  -b [elf,binary], --format [elf,binary]
                              Set input format
  --be8                       Output BE8 format image
  --build-id [=STYLE]         Generate build ID note
  --build-id-chunk-size-for-treehash SIZE
                              Chunk size for '--build-id=tree'
  --build-id-min-file-size-for-treehash SIZE
                              Minimum output file size for '--build-id=tree' to work differently than '--build-id=sha1'
  -Bdynamic                   -l searches for shared libraries (default)
  -Bstatic                    -l does not search for shared libraries
  -dy                         alias for -Bdynamic (default)
  -dn                         alias for -Bstatic
  -Bgroup                     Use group name lookup rules for shared library
  -Bshareable                 Generate shared library (alias for -G/-shared)
  -Bno-symbolic               Don't bind default visibility defined symbols locally for -shared (default)
  -Bsymbolic-functions        Bind default visibility defined function symbols locally for -shared
  -Bsymbolic                  Bind default visibility defined symbols locally for -shared
  --check-sections            Check segment addresses for overlaps (default)
  --no-check-sections         Do not check segment addresses for overlaps
  --compress-debug-sections [none,zlib,zlib-gnu,zlib-gabi,zstd]
                              Compress .debug_* sections in the output file
  --copy-dt-needed-entries    Not supported
  --no-copy-dt-needed-entries Do not copy DT_NEEDED tags from shared libraries (default)
  --cref                      Output cross reference table
  --no-cref                   Do not output cross reference table (default)
  --ctors-in-init-array       Use DT_INIT_ARRAY for all constructors (default)
  --no-ctors-in-init-array    Handle constructors as directed by compiler
  -d, --define-common         Define common symbols
  --no-define-common          Do not define common symbols in relocatable output (default)
  -dc                         Alias for -d
  -dp                         Alias for -d
  --debug [all,files,script,task][,...]
                              Turn on debugging
  --defsym SYMBOL=EXPRESSION  Define a symbol
  --demangle [=STYLE]         Demangle C++ symbols in log messages
  --no-demangle               Do not demangle C++ symbols in log messages
  --dependency-file FILE      Write a dependency file listing all files read
  --detect-odr-violations     Look for violations of the C++ One Definition Rule
  --no-detect-odr-violations  Do not look for violations of the C++ One Definition Rule (default)
  --dynamic-list-data         Add data symbols to dynamic symbols
  --dynamic-list-cpp-new      Add C++ operator new/delete to dynamic symbols
  --dynamic-list-cpp-typeinfo Add C++ typeinfo to dynamic symbols
  --dynamic-list FILE         Read a list of dynamic symbols
  --emit-stub-syms            (PowerPC only) Label linker stubs with a symbol (default)
  --no-emit-stub-syms         (PowerPC only) Do not label linker stubs with a symbol
  -e ADDRESS, --entry ADDRESS Set program start address
  --eh-frame-hdr              Create exception frame header
  --no-eh-frame-hdr           Do not create exception frame header (default)
  --enable-new-dtags          Enable use of DT_RUNPATH (default)
  --disable-new-dtags         Disable use of DT_RUNPATH
  --enable-linker-version     Put the linker version string into the .comment section
  --disable-linker-version    Put the linker version string into the .note.gnu.gold-version section (default)
  --no-enum-size-warning      (ARM only) Do not warn about objects with incompatible enum sizes
  --exclude-libs lib,lib ...  Exclude libraries from automatic export
  -E, --export-dynamic        Export all dynamic symbols
  --no-export-dynamic         Do not export all dynamic symbols (default)
  --export-dynamic-symbol SYMBOL
                              Export SYMBOL to dynamic symbol table
  -EB                         Link big-endian objects.
  -EL                         Link little-endian objects.
  -f SHLIB, --auxiliary SHLIB Auxiliary filter for shared object symbol table
  -F SHLIB, --filter SHLIB    Filter for shared object symbol table
  --fatal-warnings            Treat warnings as errors
  --no-fatal-warnings         Do not treat warnings as errors (default)
  -fini SYMBOL                Call SYMBOL at unload-time
  --fix-arm1176               (ARM only) Fix binaries for ARM1176 erratum (default)
  --no-fix-arm1176            (ARM only) Do not fix binaries for ARM1176 erratum
  --fix-cortex-a8             (ARM only) Fix binaries for Cortex-A8 erratum
  --no-fix-cortex-a8          (ARM only) Do not fix binaries for Cortex-A8 erratum (default)
  --fix-cortex-a53-843419     (AArch64 only) Fix Cortex-A53 erratum 843419
  --no-fix-cortex-a53-843419  (AArch64 only) Do not fix Cortex-A53 erratum 843419 (default)
  --fix-cortex-a53-835769     (AArch64 only) Fix Cortex-A53 erratum 835769
  --no-fix-cortex-a53-835769  (AArch64 only) Do not fix Cortex-A53 erratum 835769 (default)
  --fix-v4bx                  (ARM only) Rewrite BX rn as MOV pc, rn for ARMv4
  --fix-v4bx-interworking     (ARM only) Rewrite BX rn branch to ARMv4 interworking veneer
  -fuse-ld [gold,bfd]         Ignored for GCC linker option compatibility
  -g                          Ignored
  --gc-sections               Remove unused sections
  --no-gc-sections            Don't remove unused sections (default)
  --gdb-index                 Generate .gdb_index section
  --no-gdb-index              Do not generate .gdb_index section (default)
  --gnu-unique                Enable STB_GNU_UNIQUE symbol binding (default)
  --no-gnu-unique             Disable STB_GNU_UNIQUE symbol binding
  -G, -shared                 Generate shared library
  -h FILENAME, -soname FILENAME
                              Set shared library name
  --hash-bucket-empty-fraction FRACTION
                              Min fraction of empty buckets in dynamic hash
  --hash-style [sysv,gnu,both]
                              Dynamic hash style
  -i                          Alias for -r
  --icf [none,all,safe]       Identical Code Folding. '--icf=safe' Folds ctors, dtors and functions whose pointers are definitely not taken
  --icf-iterations COUNT      Number of iterations of ICF (default 3)
  --incremental               Do an incremental link if possible; otherwise, do a full link and prepare output for incremental linking
  --no-incremental            Do a full link (default)
  --incremental-full          Do a full link and prepare output for incremental linking
  --incremental-update        Do an incremental link; exit if not possible
  --incremental-base FILE     Set base file for incremental linking (default is output file)
  --incremental-changed       Assume files changed
  --incremental-unchanged     Assume files didn't change
  --incremental-unknown       Use timestamps to check files (default)
  --incremental-startup-unchanged
                              Assume startup files unchanged (files preceding this option)
  --incremental-patch PERCENT Amount of extra space to allocate for patches (default 10)
  -init SYMBOL                Call SYMBOL at load-time
  -I PROGRAM, --dynamic-linker PROGRAM
                              Set dynamic linker path
  --just-symbols FILE         Read only symbol values from FILE
  --keep-files-mapped         Keep files mapped across passes (default)
  --no-keep-files-mapped      Release mapped files after each pass
  --keep-unique SYMBOL        Do not fold this symbol during ICF
  -l LIBNAME, --library LIBNAME
                              Search for library LIBNAME
  --ld-generated-unwind-info  Generate unwind information for PLT (default)
  --no-ld-generated-unwind-info
                              Do not generate unwind information for PLT
  -L DIR, --library-path DIR  Add directory to search path
  --long-plt                  (ARM only) Generate long PLT entries
  --no-long-plt               (ARM only) Do not generate long PLT entries (default)
  -m EMULATION                Set GNU linker emulation; obsolete
  --map-whole-files           Map whole files to memory (default)
  --no-map-whole-files        Map relevant file parts to memory
  --merge-exidx-entries       (ARM only) Merge exidx entries in debuginfo (default)
  --no-merge-exidx-entries    (ARM only) Do not merge exidx entries in debuginfo
  --mmap-output-file          Map the output file for writing (default)
  --no-mmap-output-file       Do not map the output file for writing
  -M, --print-map             Write map file on standard output
  -Map MAPFILENAME            Write map file
  -n, --nmagic                Do not page align data
  -N, --omagic                Do not page align data, do not make text readonly
  --no-omagic                 Page align data, make text readonly (default)
  --no-keep-memory            Use less memory and more disk I/O (included only for compatibility with GNU ld)
  --no-undefined              Report undefined symbols (even with --shared)
  --noinhibit-exec            Create an output file even if errors occur
  -nostdlib                   Only search directories specified on the command line
  -o FILE, --output FILE      Set output file name
  --oformat [binary]          Set output format
  -O LEVEL, -optimize LEVEL   Optimize output file size
  --orphan-handling [place,discard,warn,error]
                              Orphan section handling
  -p                          Ignored for ARM compatibility
  --package-metadata [=JSON]  Generate package metadata note
  -pie                        Create a position independent executable
  -no-pie                     Do not create a position independent executable (default)
  --pic-executable            Create a position independent executable
  --no-pic-executable         Do not create a position independent executable (default)
  --pic-veneer                Force PIC sequences for ARM/Thumb interworking veneers
  -no-pipeline-knowledge      (ARM only) Ignore for backward compatibility (default)
  --plt-align [=P2ALIGN]      (PowerPC only) Align PLT call stubs to fit cache lines
  --plt-localentry            (PowerPC64 only) Optimize calls to ELFv2 localentry:0 functions
  --no-plt-localentry         (PowerPC64 only) Don't optimize ELFv2 calls (default)
  --plt-static-chain          (PowerPC64 only) PLT call stubs should load r11
  --no-plt-static-chain       (PowerPC64 only) PLT call stubs should not load r11 (default)
  --plt-thread-safe           (PowerPC64 only) PLT call stubs with load-load barrier
  --no-plt-thread-safe        (PowerPC64 only) PLT call stubs without barrier (default)
  --plugin PLUGIN             Load a plugin library
  --plugin-opt OPTION         Pass an option to the plugin
  --posix-fallocate           Use posix_fallocate to reserve space in the output file (default)
  --no-posix-fallocate        Use fallocate or ftruncate to reserve space
  --power10-stubs [=auto,no,yes]
                              (PowerPC64 only) stubs use power10 insns
  --no-power10-stubs          (PowerPC64 only) stubs do not use power10 insns
  --preread-archive-symbols   Preread archive symbols when multi-threaded
  --print-gc-sections         List removed unused sections on stderr
  --no-print-gc-sections      Do not list removed unused sections (default)
  --print-icf-sections        List folded identical sections on stderr
  --no-print-icf-sections     Do not list folded identical sections (default)
  --print-output-format       Print default output format
  --print-symbol-counts FILENAME
                              Print symbols defined and used for each input
  --push-state                Save the state of flags related to input files
  --pop-state                 Restore the state of flags related to input files
  -q, --emit-relocs           Generate relocations in output
  -Qy                         Ignored for SVR4 compatibility
  -r, -relocatable            Generate relocatable output
  --relax                     Relax branches on certain targets
  --no-relax                  Do not relax branches (default)
  --retain-symbols-file FILE  keep only symbols listed in this file
  --rosegment                 Put read-only non-executable sections in their own segment
  --no-rosegment              Do not put read-only non-executable sections in their own segment (default)
  --rosegment-gap OFFSET      Set offset between executable and read-only segments
  -R DIR                      Add DIR to runtime search path
  -rpath DIR                  Add DIR to runtime search path
  --rpath-link DIR            Add DIR to link time shared library search path
  -s, --strip-all             Strip all symbols
  -S, --strip-debug           Strip debugging information
  --strip-debug-non-line      Emit only debug line number information
  --strip-debug-gdb           Strip debug symbols that are unused by gdb (at least versions <= 7.4)
  --strip-lto-sections        Strip LTO intermediate code sections (default)
  --section-ordering-file FILENAME
                              Layout sections in the order specified
  --section-start SECTION=ADDRESS
                              Set address of section
  --secure-plt                (PowerPC only) Use new-style PLT (default)
  --sort-common [={ascending,descending}]
                              Sort common symbols by alignment
  --sort-section [none,name]  Sort sections by name.  '--no-text-reorder' will override '--sort-section=name' for .text
  --spare-dynamic-tags COUNT  Dynamic tag slots to reserve (default 5)
  --stub-group-size SIZE      (ARM, PowerPC only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after the group. 1 means use default size
  --stub-group-multi          (PowerPC only) Allow a group of stubs to serve multiple output sections (default)
  --no-stub-group-multi       (PowerPC only) Each output section has its own stubs
  --split-stack-adjust-size SIZE
                              Stack size when -fsplit-stack function calls non-split
  -static                     Do not link against shared libraries
  --start-lib                 Start a library
  --end-lib                   End a library
  --stats                     Print resource usage statistics
  --sysroot DIR               Set target system root directory
  -t, --trace                 Print the name of each input file
  --target1-abs               (ARM only) Force R_ARM_TARGET1 type to R_ARM_ABS32
  --target1-rel               (ARM only) Force R_ARM_TARGET1 type to R_ARM_REL32
  --target2 [rel, abs, got-rel
                              (ARM only) Set R_ARM_TARGET2 relocation type
  --text-reorder              Enable text section reordering for GCC section names (default)
  --no-text-reorder           Disable text section reordering for GCC section names
  --threads                   Run the linker multi-threaded
  --no-threads                Do not run the linker multi-threaded (default)
  --thread-count COUNT        Number of threads to use
  --thread-count-initial COUNT
                              Number of threads to use in initial pass
  --thread-count-middle COUNT Number of threads to use in middle pass
  --thread-count-final COUNT  Number of threads to use in final pass
  --tls-optimize              (PowerPC/64 only) Optimize GD/LD/IE code to IE/LE (default)
  --no-tls-optimize           (PowerPC/64 only) Don'''t try to optimize TLS accesses
  --tls-get-addr-optimize     (PowerPC/64 only) Use a special __tls_get_addr call (default)
  --no-tls-get-addr-optimize  (PowerPC/64 only) Don't use a special __tls_get_addr call
  --toc-optimize              (PowerPC64 only) Optimize TOC code sequences (default)
  --no-toc-optimize           (PowerPC64 only) Don't optimize TOC code sequences
  --toc-sort                  (PowerPC64 only) Sort TOC and GOT sections (default)
  --no-toc-sort               (PowerPC64 only) Don't sort TOC and GOT sections
  -T FILE, --script FILE      Read linker script
  -Tbss ADDRESS               Set the address of the bss segment
  -Tdata ADDRESS              Set the address of the data segment
  -Ttext ADDRESS              Set the address of the text segment
  -Ttext-segment ADDRESS      Set the address of the text segment
  -Trodata-segment ADDRESS    Set the address of the rodata segment
  -u SYMBOL, --undefined SYMBOL
                              Create undefined reference to SYMBOL
  --unresolved-symbols ignore-all,report-all,ignore-in-object-files,ignore-in-shared-libs
                              How to handle unresolved symbols
  --verbose                   Alias for --debug=files
  --version-script FILE       Read version script
  --warn-common               Warn about duplicate common symbols
  --no-warn-common            Do not warn about duplicate common symbols (default)
  --warn-constructors         Ignored
  --no-warn-constructors      Ignored
  --warn-drop-version         Warn when discarding version information
  --no-warn-drop-version      Do not warn when discarding version information (default)
  --warn-execstack            Warn if the stack is executable
  --no-warn-execstack         Do not warn if the stack is executable (default)
  --no-warn-mismatch          Don't warn about mismatched input files
  --warn-multiple-gp          Ignored
  --warn-search-mismatch      Warn when skipping an incompatible library (default)
  --no-warn-search-mismatch   Don't warn when skipping an incompatible library
  --warn-shared-textrel       Warn if text segment is not shareable
  --no-warn-shared-textrel    Do not warn if text segment is not shareable (default)
  --warn-unresolved-symbols   Report unresolved symbols as warnings
  --error-unresolved-symbols  Report unresolved symbols as errors (default)
  --no-wchar-size-warning     (ARM only) Do not warn about objects with incompatible wchar_t sizes
  --weak-unresolved-symbols   Convert unresolved symbols to weak references
  --whole-archive             Include all archive contents
  --no-whole-archive          Include only needed archive contents (default)
  --wrap SYMBOL               Use wrapper functions for SYMBOL
  -x, --discard-all           Delete all local symbols
  -X, --discard-locals        Delete all temporary local symbols
  --discard-none              Keep all local symbols
  -y SYMBOL, --trace-symbol SYMBOL
                              Trace references to symbol
  --undefined-version         Allow unused version in script (default)
  --no-undefined-version      Do not allow unused version in script
  -Y PATH                     Default search path for Solaris compatibility
  -(, --start-group           Start a library search group
  -), --end-group             End a library search group
  -z combreloc                Sort dynamic relocs (default)
  -z nocombreloc              Do not sort dynamic relocs
  -z common-page-size=SIZE    Set common page size to SIZE
  -z defs                     Report undefined symbols (even with --shared)
  -z execstack                Mark output as requiring executable stack
  -z global                   Make symbols in DSO available for subsequently loaded objects
  -z initfirst                Mark DSO to be initialized first at runtime
  -z interpose                Mark object to interpose all DSOs but executable
  -z unique                   Mark DSO to be loaded at most once, and only in the main namespace
  -z nounique                 Do not mark the DSO as one to be loaded only in the main namespace (default)
  -z lazy                     Mark object for lazy runtime binding (default)
  -z loadfltr                 Mark object requiring immediate process
  -z max-page-size=SIZE       Set maximum page size to SIZE
  -z muldefs                  Allow multiple definitions of symbols
  -z nocopyreloc              Do not create copy relocs
  -z nodefaultlib             Mark object not to use default search paths
  -z nodelete                 Mark DSO non-deletable at runtime
  -z nodlopen                 Mark DSO not available to dlopen
  -z nodump                   Mark DSO not available to dldump
  -z noexecstack              Mark output as not requiring executable stack
  -z now                      Mark object for immediate function binding
  -z origin                   Mark DSO to indicate that needs immediate $ORIGIN processing at runtime
  -z relro                    Where possible mark variables read-only after relocation (default)
  -z norelro                  Don't mark variables read-only after relocation
  -z stack-size=SIZE          Set PT_GNU_STACK segment p_memsz to SIZE
  -z start-stop-visibility=[default,internal,hidden,protected]
                              ELF symbol visibility for synthesized __start_* and __stop_* symbols
  -z text                     Do not permit relocations in read-only segments
  -z notext                   Permit relocations in read-only segments (default)
  -z textoff                  Permit relocations in read-only segments (default)
  -z text-unlikely-segment    Move .text.unlikely sections to a separate segment.
  -z notext-unlikely-segment  Do not move .text.unlikely sections to a separate segment. (default)
  -z keep-text-section-prefix Keep .text.hot, .text.startup, .text.exit and .text.unlikely as separate sections in the final binary.
  -z nokeep-text-section-prefix
                              Merge all .text.* prefix sections. (default)
/usr/bin/ld.gold: supported targets: elf64-s390 elf32-s390 elf64-littleaarch64 elf64-bigaarch64 elf32-littleaarch64 elf32-bigaarch64 elf64-tradlittlemips elf64-tradbigmips elf32-tradlittlemips elf32-tradbigmips elf32-tilegx-be elf64-tilegx-be elf32-tilegx-le elf64-tilegx-le elf32-bigarm elf32-littlearm elf64-powerpcle elf64-powerpc elf32-powerpcle elf32-powerpc elf64-sparc elf32-sparc elf32-x86-64 elf32-x86-64-freebsd elf64-x86-64 elf64-x86-64-freebsd elf32-iamcu elf32-i386 elf32-i386-freebsd
/usr/bin/ld.gold: supported emulations: elf64_s390 elf32_s390 aarch64_elf64_le_vec aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec elf64ltsmip elf64btsmip elf32ltsmip elf32btsmip elf32tilegx_be elf64tilegx_be elf32tilegx elf64tilegx armelfb armelf elf64lppc elf64ppc elf32lppc elf32ppc elf64_sparc elf32_sparc elf32_x86_64 elf_x86_64 elf_iamcu elf_i386
Report bugs to <https://sourceware.org/bugzilla/>
Options (250)
OptionDescriptionSource
--helpReport usage informationhelp
-v, --versionReport version informationhelp
-VReport version and target informationhelp
--add-neededNot supportedhelp
--no-add-neededDo not copy DT_NEEDED tags from shared libraries (default)help
--no-allow-multiple-definitionDo not allow multiple definitions (default)help
--allow-shlib-undefinedAllow unresolved references in shared librarieshelp
--no-allow-shlib-undefinedDo not allow unresolved references in shared libraries (default)help
--apply-dynamic-relocsApply link-time values for dynamic relocations (default)help
--no-apply-dynamic-relocs(aarch64 only) Do not apply link-time values for dynamic relocationshelp
--as-neededUse DT_NEEDED only for shared libraries that are usedhelp
--no-as-neededUse DT_NEEDED for all shared libraries (default)help
-assert ignoredIgnoredhelp
--be8Output BE8 format imagehelp
--build-id STYLEGenerate build ID notehelp
--build-id-chunk-size-for-treehash SIZEChunk size for '--build-id=tree'help
--build-id-min-file-size-for-treehash SIZEMinimum output file size for '--build-id=tree' to work differently than '--build-id=sha1'help
-Bdynamic-l searches for shared libraries (default)help
-Bstatic-l does not search for shared librarieshelp
-dyalias for -Bdynamic (default)help
-dnalias for -Bstatichelp
-BgroupUse group name lookup rules for shared libraryhelp
-BshareableGenerate shared library (alias for -G/-shared)help
-Bno-symbolicDon't bind default visibility defined symbols locally for -shared (default)help
-Bsymbolic-functionsBind default visibility defined function symbols locally for -sharedhelp
-BsymbolicBind default visibility defined symbols locally for -sharedhelp
--check-sectionsCheck segment addresses for overlaps (default)help
--no-check-sectionsDo not check segment addresses for overlapshelp
--compress-debug-sections noneCompress .debug_* sections in the output filehelp
--copy-dt-needed-entriesNot supportedhelp
--crefOutput cross reference tablehelp
--no-crefDo not output cross reference table (default)help
--ctors-in-init-arrayUse DT_INIT_ARRAY for all constructors (default)help
--no-ctors-in-init-arrayHandle constructors as directed by compilerhelp
-d, --define-commonDefine common symbolshelp
--no-define-commonDo not define common symbols in relocatable output (default)help
-dcAlias for -dhelp
-dpAlias for -dhelp
--debug allTurn on debugginghelp
--defsym SYMBOL=EXPRESSIONDefine a symbolhelp
--demangle STYLEDemangle C++ symbols in log messageshelp
--no-demangleDo not demangle C++ symbols in log messageshelp
--dependency-file FILEWrite a dependency file listing all files readhelp
--detect-odr-violationsLook for violations of the C++ One Definition Rulehelp
--no-detect-odr-violationsDo not look for violations of the C++ One Definition Rule (default)help
--dynamic-list-dataAdd data symbols to dynamic symbolshelp
--dynamic-list-cpp-newAdd C++ operator new/delete to dynamic symbolshelp
--dynamic-list FILERead a list of dynamic symbolshelp
--emit-stub-syms(PowerPC only) Label linker stubs with a symbol (default)help
--no-emit-stub-syms(PowerPC only) Do not label linker stubs with a symbolhelp
--eh-frame-hdrCreate exception frame headerhelp
--no-eh-frame-hdrDo not create exception frame header (default)help
--enable-new-dtagsEnable use of DT_RUNPATH (default)help
--disable-new-dtagsDisable use of DT_RUNPATHhelp
--enable-linker-versionPut the linker version string into the .comment sectionhelp
--disable-linker-versionPut the linker version string into the .note.gnu.gold-version section (default)help
--no-enum-size-warning(ARM only) Do not warn about objects with incompatible enum sizeshelp
--exclude-libs libExclude libraries from automatic exporthelp
-E, --export-dynamicExport all dynamic symbolshelp
--no-export-dynamicDo not export all dynamic symbols (default)help
--export-dynamic-symbol SYMBOLExport SYMBOL to dynamic symbol tablehelp
-EBLink big-endian objects.help
-ELLink little-endian objects.help
-F, --filter SHLIBFilter for shared object symbol tablehelp
--fatal-warningsTreat warnings as errorshelp
--no-fatal-warningsDo not treat warnings as errors (default)help
-fini SYMBOLCall SYMBOL at unload-timehelp
--fix-arm1176(ARM only) Fix binaries for ARM1176 erratum (default)help
--no-fix-arm1176(ARM only) Do not fix binaries for ARM1176 erratumhelp
--fix-cortex-a8(ARM only) Fix binaries for Cortex-A8 erratumhelp
--no-fix-cortex-a8(ARM only) Do not fix binaries for Cortex-A8 erratum (default)help
--fix-cortex-a53-843419(AArch64 only) Fix Cortex-A53 erratum 843419help
--no-fix-cortex-a53-843419(AArch64 only) Do not fix Cortex-A53 erratum 843419 (default)help
--fix-cortex-a53-835769(AArch64 only) Fix Cortex-A53 erratum 835769help
--no-fix-cortex-a53-835769(AArch64 only) Do not fix Cortex-A53 erratum 835769 (default)help
--fix-v4bx(ARM only) Rewrite BX rn as MOV pc, rn for ARMv4help
--fix-v4bx-interworking(ARM only) Rewrite BX rn branch to ARMv4 interworking veneerhelp
-fuse-ld goldIgnored for GCC linker option compatibilityhelp
-gIgnoredhelp
--gc-sectionsRemove unused sectionshelp
--no-gc-sectionsDon't remove unused sections (default)help
--gdb-indexGenerate .gdb_index sectionhelp
--no-gdb-indexDo not generate .gdb_index section (default)help
--gnu-uniqueEnable STB_GNU_UNIQUE symbol binding (default)help
--no-gnu-uniqueDisable STB_GNU_UNIQUE symbol bindinghelp
-G, -sharedGenerate shared libraryhelp
--hash-bucket-empty-fraction FRACTIONMin fraction of empty buckets in dynamic hashhelp
--hash-style sysvDynamic hash stylehelp
-iAlias for -rhelp
--icf noneIdentical Code Folding.help
--icf-iterations COUNTNumber of iterations of ICF (default 3)help
--incrementalDo an incremental link if possible;help
--no-incrementalDo a full link (default)help
--incremental-fullDo a full link and prepare output for incremental linkinghelp
--incremental-updateDo an incremental link;help
--incremental-base FILESet base file for incremental linking (default is output file)help
--incremental-changedAssume files changedhelp
--incremental-unchangedAssume files didn't changehelp
--incremental-unknownUse timestamps to check files (default)help
--incremental-startup-unchangedAssume startup files unchanged (files preceding this option)help
-init SYMBOLCall SYMBOL at load-timehelp
--just-symbols FILERead only symbol values from FILEhelp
--keep-files-mappedKeep files mapped across passes (default)help
--no-keep-files-mappedRelease mapped files after each passhelp
--keep-unique SYMBOLDo not fold this symbol during ICFhelp
--ld-generated-unwind-infoGenerate unwind information for PLT (default)help
--no-ld-generated-unwind-infoDo not generate unwind information for PLThelp
-L, --library-path DIRAdd directory to search pathhelp
--long-plt(ARM only) Generate long PLT entrieshelp
--no-long-plt(ARM only) Do not generate long PLT entries (default)help
-m EMULATIONSet GNU linker emulation;help
--map-whole-filesMap whole files to memory (default)help
--no-map-whole-filesMap relevant file parts to memoryhelp
--merge-exidx-entries(ARM only) Merge exidx entries in debuginfo (default)help
--no-merge-exidx-entries(ARM only) Do not merge exidx entries in debuginfohelp
--mmap-output-fileMap the output file for writing (default)help
--no-mmap-output-fileDo not map the output file for writinghelp
-M, --print-mapWrite map file on standard outputhelp
-Map MAPFILENAMEWrite map filehelp
-n, --nmagicDo not page align datahelp
-N, --omagicDo not page align data, do not make text readonlyhelp
--no-omagicPage align data, make text readonly (default)help
--no-keep-memoryUse less memory and more disk I/O (included only for compatibility with GNU ld)help
--no-undefinedReport undefined symbols (even with --shared)help
--noinhibit-execCreate an output file even if errors occurhelp
-nostdlibOnly search directories specified on the command linehelp
-o, --output FILESet output file namehelp
--oformat binarySet output formathelp
-O, -optimize LEVELOptimize output file sizehelp
--orphan-handling placeOrphan section handlinghelp
-pIgnored for ARM compatibilityhelp
--package-metadata JSONGenerate package metadata notehelp
-pieCreate a position independent executablehelp
-no-pieDo not create a position independent executable (default)help
--pic-executableCreate a position independent executablehelp
--no-pic-executableDo not create a position independent executable (default)help
--pic-veneerForce PIC sequences for ARM/Thumb interworking veneershelp
-no-pipeline-knowledge(ARM only) Ignore for backward compatibility (default)help
--plt-align P2ALIGN(PowerPC only) Align PLT call stubs to fit cache lineshelp
--plt-localentry(PowerPC64 only) Optimize calls to ELFv2 localentry:0 functionshelp
--no-plt-localentry(PowerPC64 only) Don't optimize ELFv2 calls (default)help
--plt-static-chain(PowerPC64 only) PLT call stubs should load r11help
--no-plt-static-chain(PowerPC64 only) PLT call stubs should not load r11 (default)help
--plt-thread-safe(PowerPC64 only) PLT call stubs with load-load barrierhelp
--no-plt-thread-safe(PowerPC64 only) PLT call stubs without barrier (default)help
--plugin PLUGINLoad a plugin libraryhelp
--plugin-opt OPTIONPass an option to the pluginhelp
--posix-fallocateUse posix_fallocate to reserve space in the output file (default)help
--no-posix-fallocateUse fallocate or ftruncate to reserve spacehelp
--power10-stubs auto(PowerPC64 only) stubs use power10 insnshelp
--no-power10-stubs(PowerPC64 only) stubs do not use power10 insnshelp
--preread-archive-symbolsPreread archive symbols when multi-threadedhelp
--print-gc-sectionsList removed unused sections on stderrhelp
--no-print-gc-sectionsDo not list removed unused sections (default)help
--print-icf-sectionsList folded identical sections on stderrhelp
--no-print-icf-sectionsDo not list folded identical sections (default)help
--print-output-formatPrint default output formathelp
--print-symbol-counts FILENAMEPrint symbols defined and used for each inputhelp
--push-stateSave the state of flags related to input fileshelp
--pop-stateRestore the state of flags related to input fileshelp
-q, --emit-relocsGenerate relocations in outputhelp
-QyIgnored for SVR4 compatibilityhelp
-r, -relocatableGenerate relocatable outputhelp
--relaxRelax branches on certain targetshelp
--no-relaxDo not relax branches (default)help
--retain-symbols-file FILEkeep only symbols listed in this filehelp
--rosegmentPut read-only non-executable sections in their own segmenthelp
--no-rosegmentDo not put read-only non-executable sections in their own segment (default)help
--rosegment-gap OFFSETSet offset between executable and read-only segmentshelp
-R DIRAdd DIR to runtime search pathhelp
-rpath DIRAdd DIR to runtime search pathhelp
--rpath-link DIRAdd DIR to link time shared library search pathhelp
-s, --strip-allStrip all symbolshelp
-S, --strip-debugStrip debugging informationhelp
--strip-debug-non-lineEmit only debug line number informationhelp
--strip-debug-gdbStrip debug symbols that are unused by gdb (at least versions <= 7.4)help
--strip-lto-sectionsStrip LTO intermediate code sections (default)help
--section-ordering-file FILENAMELayout sections in the order specifiedhelp
--section-start SECTION=ADDRESSSet address of sectionhelp
--secure-plt(PowerPC only) Use new-style PLT (default)help
--sort-common ascendingSort common symbols by alignmenthelp
--sort-section noneSort sections by name.help
--spare-dynamic-tags COUNTDynamic tag slots to reserve (default 5)help
--stub-group-size SIZE(ARM, PowerPC only) The maximum distance from instructions in a group of sections to their stubs.help
--stub-group-multi(PowerPC only) Allow a group of stubs to serve multiple output sections (default)help
--no-stub-group-multi(PowerPC only) Each output section has its own stubshelp
--split-stack-adjust-size SIZEStack size when -fsplit-stack function calls non-splithelp
-staticDo not link against shared librarieshelp
--start-libStart a libraryhelp
--end-libEnd a libraryhelp
--statsPrint resource usage statisticshelp
--sysroot DIRSet target system root directoryhelp
-t, --tracePrint the name of each input filehelp
--target1-abs(ARM only) Force R_ARM_TARGET1 type to R_ARM_ABS32help
--target1-rel(ARM only) Force R_ARM_TARGET1 type to R_ARM_REL32help
--target2 rel(ARM only) Set R_ARM_TARGET2 relocation typehelp
--text-reorderEnable text section reordering for GCC section names (default)help
--no-text-reorderDisable text section reordering for GCC section nameshelp
--threadsRun the linker multi-threadedhelp
--no-threadsDo not run the linker multi-threaded (default)help
--thread-count COUNTNumber of threads to usehelp
--thread-count-initial COUNTNumber of threads to use in initial passhelp
--thread-count-final COUNTNumber of threads to use in final passhelp
--tls-optimize(PowerPC/64 only) Optimize GD/LD/IE code to IE/LE (default)help
--no-tls-optimize(PowerPC/64 only) Don'''t try to optimize TLS accesseshelp
--tls-get-addr-optimize(PowerPC/64 only) Use a special __tls_get_addr call (default)help
--no-tls-get-addr-optimize(PowerPC/64 only) Don't use a special __tls_get_addr callhelp
--toc-optimize(PowerPC64 only) Optimize TOC code sequences (default)help
--no-toc-optimize(PowerPC64 only) Don't optimize TOC code sequenceshelp
--toc-sort(PowerPC64 only) Sort TOC and GOT sections (default)help
--no-toc-sort(PowerPC64 only) Don't sort TOC and GOT sectionshelp
-T, --script FILERead linker scripthelp
-Tbss ADDRESSSet the address of the bss segmenthelp
-Tdata ADDRESSSet the address of the data segmenthelp
-Ttext ADDRESSSet the address of the text segmenthelp
-Ttext-segment ADDRESSSet the address of the text segmenthelp
-Trodata-segment ADDRESSSet the address of the rodata segmenthelp
--unresolved-symbols ignore-allHow to handle unresolved symbolshelp
--verboseAlias for --debug=fileshelp
--version-script FILERead version scripthelp
--warn-commonWarn about duplicate common symbolshelp
--no-warn-commonDo not warn about duplicate common symbols (default)help
--warn-constructorsIgnoredhelp
--no-warn-constructorsIgnoredhelp
--warn-drop-versionWarn when discarding version informationhelp
--no-warn-drop-versionDo not warn when discarding version information (default)help
--warn-execstackWarn if the stack is executablehelp
--no-warn-execstackDo not warn if the stack is executable (default)help
--no-warn-mismatchDon't warn about mismatched input fileshelp
--warn-multiple-gpIgnoredhelp
--warn-search-mismatchWarn when skipping an incompatible library (default)help
--no-warn-search-mismatchDon't warn when skipping an incompatible libraryhelp
--warn-shared-textrelWarn if text segment is not shareablehelp
--no-warn-shared-textrelDo not warn if text segment is not shareable (default)help
--warn-unresolved-symbolsReport unresolved symbols as warningshelp
--error-unresolved-symbolsReport unresolved symbols as errors (default)help
--no-wchar-size-warning(ARM only) Do not warn about objects with incompatible wchar_t sizeshelp
--weak-unresolved-symbolsConvert unresolved symbols to weak referenceshelp
--whole-archiveInclude all archive contentshelp
--no-whole-archiveInclude only needed archive contents (default)help
--wrap SYMBOLUse wrapper functions for SYMBOLhelp
-x, --discard-allDelete all local symbolshelp
-X, --discard-localsDelete all temporary local symbolshelp
--discard-noneKeep all local symbolshelp
--undefined-versionAllow unused version in script (default)help
--no-undefined-versionDo not allow unused version in scripthelp
-Y PATHDefault search path for Solaris compatibilityhelp
--start-groupStart a library search grouphelp
--end-groupEnd a library search grouphelp
-z combrelocSort dynamic relocs (default)help

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