Home Explore Blog CI



man-pages

14th chunk of `ld.man`
7ffc69302d8fa5b5286b811ff1142db222c1bb3ff5d6b9070000000100000fb7
 if --orphan-handling is not given is "place".

       --unique[=SECTION]
           Creates  a  separate  output  section  for  every input section matching SECTION, or if the optional wildcard SECTION argument is missing, for every orphan input section.  An orphan section is one not specifically
           mentioned in a linker script.  You may use this option multiple times on the command line;  It prevents the normal merging of input sections with the same name, overriding output section assignments  in  a  linker
           script.

       -v
       --version
       -V  Display  the  version  number  for  ld.  The -V option also lists the supported emulations.  See also the description of the --enable-linker-version in Options,,Command-line Options which can be used to insert the
           linker version string into a binary.

       -x
       --discard-all
           Delete all local symbols.

       -X
       --discard-locals
           Delete all temporary local symbols.  (These symbols start with system‐specific local label prefixes, typically .L for ELF systems or L for traditional a.out systems.)

       -y symbol
       --trace-symbol=symbol
           Print the name of each linked file in which symbol appears.  This option may be given any number of times.  On many systems it is necessary to prepend an underscore.

           This option is useful when you have an undefined symbol in your link but don’t know where the reference is coming from.

       -Y path
           Add path to the default library search path.  This option exists for Solaris compatibility.

       -z keyword
           The recognized keywords are:

           call-nop=prefix-addr
           call-nop=suffix-nop
           call-nop=prefix-byte
           call-nop=suffix-byte
               Specify the 1-byte "NOP" padding when transforming indirect call to a locally defined function, foo, via its GOT slot.  call-nop=prefix-addr generates "0x67 call foo".  call-nop=suffix-nop generates "call  foo
               0x90".  call-nop=prefix-byte generates "byte call foo".  call-nop=suffix-byte generates "call foo byte".  Supported for i386 and x86_64.

           cet-report=none
           cet-report=warning
           cet-report=error
               Specify  how  to  report  the  missing  GNU_PROPERTY_X86_FEATURE_1_IBT and GNU_PROPERTY_X86_FEATURE_1_SHSTK properties in input .note.gnu.property section.  cet-report=none, which is the default, will make the
               linker not report missing properties in input files.  cet-report=warning will make the linker issue a warning for missing properties in input files.  cet-report=error will make the linker issue  an  error  for
               missing  properties in input files.  Note that ibt will turn off the missing GNU_PROPERTY_X86_FEATURE_1_IBT property report and shstk will turn off the missing GNU_PROPERTY_X86_FEATURE_1_SHSTK property report.
               Supported for Linux/i386 and Linux/x86_64.

           combreloc
           nocombreloc
               Combine multiple dynamic relocation sections and sort to improve dynamic symbol lookup caching.  Do not do this if nocombreloc.

           common
           nocommon
               Generate common symbols with STT_COMMON type during a relocatable link.  Use STT_OBJECT type if nocommon.

           common-page-size=value
               Set the page size most commonly used to value.  Memory image layout will be optimized to minimize memory pages if the system is using pages of this size.

           defs
               Report unresolved symbol references from regular object files.  This is done even if the linker is creating a non‐symbolic shared library.  This option is the inverse of -z undefs.

           dynamic‐undefined‐weak
           nodynamic‐undefined‐weak
               Make undefined weak symbols dynamic when building a dynamic object, if they are referenced from a regular object file and not forced local by symbol visibility or versioning.

Title: LD (GNU Linker) - Unique Sections, Version, Symbol Discarding, Symbol Tracing, Library Paths, and Keyword Options
Summary
This section details linker options: `--unique` for separate output sections, `-v` for version display, `-x` and `-X` for symbol discarding, `-y` for symbol tracing, `-Y` for library paths, and `-z` for various keywords like `call-nop`, `cet-report`, `combreloc`, `common`, `common-page-size`, `defs`, and `dynamic-undefined-weak`.