*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> ld_ia (1)              
Title
Content
Arch
Section
 

Contents


 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



 NAME    [Toc]    [Back]
      ld_ia: ld - link editor

 SYNOPSIS    [Toc]    [Back]
    The link editor.
      ld [-bdmnqrstvxzEGINOPQSTVZ] [-a search] [-c filename] [-dynamic]
           [-e epsym] [-h symbol]...  [-k filename] [-lx | file] ...
           [-l: library] [-m] [-noshared] [-noshared_dynamic] [-o outfile]
           [-symbolic] [-u symbol]...  [-y symbol]...  [-A name]
           [-B bind]...  [-C n] [-D offset] [-Fl] [-Fw] [-Fz] [-G]
           [-L dir]...
           [-N] [-O] [-Pd] [-PD file] [-PF file] [-Q] [-R offset] [-S] [-T]
           [+[no]allowunsats] [+as mode]
           [+b path_list] [+cdp oldpath:newpath] [+cg path] [+compat]
           [+copyobjdebug] [+[no]defaultrpath] [+df file]
           [+dumpextern filename] [+dpv] [+e symbol]...  [+ee symbol]...
           [+fb] [+fbu] [+filter shared_library_path]
           [+fini function]...  [+[no]forceload]
           [+gstbuckets size] [+gst] [+gstsize size] [+h internal_name]
           [+help] [+hideallsymbols] [+ild] [+ildnowarn] [+ildpad percentage]
           [+ildrelink] [+init function]...  [+instrumenter filename]
           [+interp filename] [+k] [+mergeseg] [+n] [+nocopyobjdebug]
           [+nodynhash] [+nodefaultmap] [+noenvvar]
           [+noobjdebug] [+nosectionmerge] [+nosmartbind] [+nosrcpos]
           [+objdebugonly] [+origin shared_library_name] [+paddata pagesize]
           [+padtext pagesize] [+pd size] [+pdzero] [+pgm name] [+pi size]
           [+plabel_cache flag] [+profilebucketsize 16|32] [+rpathfirst]
           [+s] [+std] [+stripunwind] [+tools] [+v[no]shlibunsats]
           [+vallcompatwarnings] [+v[no]compatwarnings]
           [+vtype type] [+FP flag] [+I symbol]...  [+O[no]fastaccess]
           [+O[no]procelim] [ +Oreusedir=dir ] [+Oselectivepercent n]
           [+Oselectivesize size] [+OselectiveO3] [+Ostaticprediction]
           [+allowdups] [+interposer] [+[no]lazyload]

 DESCRIPTION    [Toc]    [Back]
      ld takes one or more object files or libraries as input and combines
      them to produce a single (usually executable) file.  In doing so it
      resolves references to external symbols, assigns final addresses to
      procedures and variables, revises code and data to reflect new
      addresses (a process called "relocation") and updates symbolic debug
      information when present in the file.  By default, ld produces an
      executable file that can be run by the HP-UX loader exec() (see
      exec(2)).  Alternatively, the linker can generate a relocatable file
      that is suitable for further processing by ld (see -r below).  It can
      also generate a shared library (see -b below).  The linker marks the
      output file non-executable if there are any duplicate symbols or any
      unresolved external references remain.  ld may or may not generate an
      output file (see +k option) if any other errors occur during its
      operation.





 Hewlett-Packard Company            - 1 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



      ld recognizes three kinds of input files: object files created by the
      compilers, assembler, or linker (also known as .o files), shared
      libraries created by the linker, and archives of object files (called
      archive libraries).  An archive library contains a table of all the
      externally-visible symbols from its component object files.  (The
      archiver command ar(1) creates and maintains this index.) ld uses this
      table to resolve references to external symbols.

      ld processes files in the same order as they appear on the command
      line.  It includes code and data from an archive library element if
      and only if that object module provides a definition for a currently
      unresolved reference within the user's program (see +[no]forceload).
      It is common practice to list libraries following the names of all
      simple object files on the command line.

      Code and data from shared libraries is never copied into an executable
      program.  For 32-bit mode, crt0.o is found at
      /usr/ccs/lib/hpux32/crt0.o.  For 64-bit mode, crt0.o is found at
      /usr/ccs/lib/hpux64/crt0.o.  You should include crt0.o in a -noshared
      link.  For 32-bit mode, the dynamic loader is found at
      /usr/lib/hpux32/dld.so.  For 64-bit mode, the dynamic loader is found
      at /usr/lib/hpux64/dld.so.  The dynamic loader attaches each required
      library to the process and resolves all symbolic references between
      the program and its libraries.

      The text segment of a shared library is shared among all processes
      that use the library; each process using the library receives its own
      copy of the data segment.  If pxdb -s on has been run on the
      executable that loads the library, the text segment of a shared
      library is mapped privately for each process running the executable.
      ld recursively examines the dependencies of shared libraries used by a
      program that was created by ld.  If ld does not find a supporting
      shared library at the path recorded in the dependency list of a shared
      library, and if the dependency is the result of an -l argument used
      when the shared library was created, ld searchs all the directories
      that it would search for a library that was specified with -l (see -L
      and LPATH).

    Options    [Toc]    [Back]
           -a search      Specify whether shared or archive libraries are
                          searched with the -l option.  The value of search
                          should be one of archive, shared, archive_shared,
                          shared_archive, or default.  This option can
                          appear more than once, interspersed among -l
                          options, to control the searching for each
                          library.  The default is to use the shared version
                          of a library if one is available, or the archive
                          version if not.

                          If either archive or shared is active, only the
                          specified library type is accepted.



 Hewlett-Packard Company            - 2 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          If archive_shared is active, the archive form is
                          preferred, but the shared form is allowed.

                          If shared_archive is active, the shared form is
                          preferred but the archive form is allowed.

                          To create a statically-bound program, use the
                          -noshared option rather than -a archive.

           -b             Create a shared library rather than a normal
                          executable file.  Object files processed with this
                          option must contain position-independent code
                          (PIC), generated by default by the compiler.  See
                          the discussion of position-independent code in
                          cc(1), aCC(1), f90(1), as(1), and Linker and
                          Libraries Online User Guide.

           -c filename    Read ld options from a file.  Each line contains
                          zero or more arguments separated by white space.
                          Each line in the file, including the last line,
                          must end with a newline character.  A # character
                          implies that the rest of the line is a comment.
                          To escape a # character, use the sequence ##.

           -d             Force definition of ``common'' symbols; that is,
                          assign addresses and sizes, for -r output.

           -dynamic       This option is the default.  Instructs the linker
                          to produce a dynamically linked executable (a
                          program which can use shared libraries).  This
                          option is the complement of -noshared.

                          If no shared libraries are linked in, the linker
                          builds a dynamically linked executable.  However,
                          in PA32-bit mode using the +compat option, if no
                          shared libraries are linked in, the linker builds
                          a statically bound executable (or archive bound
                          executable).

                          For dynamically linked executables, the dynamic
                          loader is involved in the process of loading the
                          executable, regardless of whether it was linked
                          with shared libraries.  For -noshared (or
                          statically bound) programs, control does not pass
                          to the dynamic loader.  See dld.so(5) for more
                          information.

           -e epsym       Set the default entry point address for the output
                          file to be that of the symbol epsym.  (This option
                          only applies to executable files.)




 Hewlett-Packard Company            - 3 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



           -h symbol      Prior to writing the symbol table to the output
                          file, mark this name as ``local'' so that it is no
                          longer externally visible.  This ensures that this
                          particular entry will not clash with a definition
                          in another file during future processing by ld.
                          If used when building a shared library or program,
                          this option prevents the named symbol from being
                          visible to the dynamic loader.

                          You can specify more than one symbol on the
                          command line with multiple option-symbol pairs,
                          that is, each symbol you specify must be preceded
                          by the -h option.

           -k filename    Specify a mapfile that describes the output file
                          memory map.

                          Please refer to HP-UX Linker and Libraries User's
                          Guide guide and the +nodefaultmap for more
                          information.

           -lx            Search a library libx.a, libx.so, or libx.sl,
                          where x is one or more characters.  The current
                          state of the -a option determines whether the
                          archive (.a) or shared (.sl or .so) version of a
                          library is searched.  Because a library is
                          searched when its name is encountered, the
                          placement of a -l is significant.  By default,
                          32-bit libraries are located in /usr/lib/hpux32.
                          64-bit libraries are located in /usr/lib/hpux64.
                          If the environment variable LPATH is present in
                          the user's environment, it should contain a
                          colon-separated list of directories to search.
                          These directories are searched instead of the
                          default directories, but -L options can still be
                          used.  If a program uses shared libraries, the
                          dynamic loader, /usr/lib/hpux32/dld.so for 32-bit,
                          or /usr/lib/hpux64/dld.so for 64-bit, attempts to
                          load each library from the same directory in which
                          it was found at link time (see the +s and +b
                          options).

           -l: library    Search the library specified. Similar to the -l
                          option except the current state of the -a option
                          is not important. The library name can be any
                          valid filename.

           -m             Produce a load map on the standard output.

           -n             This option is ignored.




 Hewlett-Packard Company            - 4 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



           -noshared      Force the linker to create a fully archive bound
                          program (also called statically-bound executable).
                          Specify /usr/ccs/lib/hpux32/crt0.o or
                          /usr/ccs/lib/hpux64/crt0.o (or equivalent startup
                          code) on the ld command line when you use this
                          option.  This option is the complement of
                          -dynamic.

                          For dynamically linked executables, the dynamic
                          loader is involved in the process of loading the
                          executable, regardless of whether it was linked
                          with shared libraries.  For statically linked
                          programs, control does not pass to the dynamic
                          loader.

           -noshared_dynamic
                          Create a dynamically linked program if shared
                          libraries are linked in.  If no shared libraries
                          are linked in, the linker creates a fully archive
                          bound program.  This option is the default in
                          compatibility mode (with the +compat) options.
                          See also the -dynamic and -noshared options.

           -o outfile     Produce an output object file named outfile (a.out
                          if -o outfile is not specified).

           -q             This option is ignored.

           -r             Retain relocation information in the output file
                          for subsequent re-linking.  The ld command does
                          not report undefined symbols.  This option cannot
                          be used when building a shared library ( -b ) or
                          in conjunction with the -s, -x, or the +ild
                          incremental linking options.

           -s             Strip the output file of all symbol table,
                          relocation, and debug support information.  (The
                          strip(1) command also removes this information.)
                          This option is incompatible with the -r option and
                          the +ild option.

                          Note:  Use of the -s option might impair or
                          prevent the use of a symbolic debugger on the
                          resulting program.

           -symbolic symbol
                          When building a shared library, causes the linker
                          to resolve all references to the specified symbol
                          to the symbol defined in the library.  This option
                          is similar to -B symbolic, but operates on a per
                          symbol basis.



 Hewlett-Packard Company            - 5 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          You can specify more than one symbol on the
                          command line with multiple option-symbol pairs,
                          that is, each symbol you specify must be preceded
                          by the -symbolic option.

           -t             Print a trace (to standard output) of each input
                          file as ld processes it.

           -u symbol      Enter symbol as an undefined symbol in the symbol
                          table.  The resulting unresolved reference is
                          useful for linking a program solely from object
                          files in a library.

                          You can specify more than one symbol on the
                          command line with multiple option-symbol pairs,
                          that is, each symbol you specify must be preceded
                          by the -u option.

           -v             Display verbose messages during linking.  This
                          option is equivalent to +vtype all (see the +vtype
                          option for more information).

           -x             Strip local symbols from the output file.  This
                          reduces the size of the output file without
                          impairing the effectiveness of object file
                          utilities.  This option is incompatible with the
                          -r option and the +ild options.  (The incremental
                          linker requires the parts of the output load
                          module which are stripped out with the -x option.)

                          Note:  Use of the -x option might impair or
                          prevent the use of a symbolic debugger on the
                          resulting program.

           -y symbol      Indicate each file in which symbol appears.  You
                          can specify more than one symbol on the command
                          line with multiple option-symbol pairs, that is,
                          each symbol you specify must be preceded by the -y
                          option.

           -z             Arrange for run-time dereferencing of null
                          pointers to produce a SIGSEGV signal.  (This is
                          the complement of the -Z option.  -Z is the
                          default.)

           -A name        This option is ignored and generates a warning
                          message.

           -B bind        Select run-time binding behavior of a program
                          using shared libraries or the binding preference
                          in building a shared library.  The most common



 Hewlett-Packard Company            - 6 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          values for bind are:

                          direct
                               Create direct link between symbol references
                               and shared libraries by recording the name of
                               the resolved shared libray during symbol
                               resolution. This information is used during
                               runtime to quickly resolve symbols without
                               searching through all currently loaded
                               libraries.

                               -B direct will implicitly turn on symbolic
                               binding (see -B symbolic) and disable
                               dependent shared library processing.

                               Direct binding can be disable during runtime
                               by setting the LD_NODIRECTBIND environment
                               variable.

                          deferred
                               Bind addresses on first reference rather than
                               at program start-up time. This is the
                               default.

                          group
                               Mark the shared library so that it behaves as
                               if loaded with RTLD_GROUP flag to dlopen().
                               This does not affect the dependent shared
                               libraries.

                          immediate
                               Bind addresses of all symbols immediately
                               upon loading the library.  Commonly followed
                               by -B nonfatal to allow procedure calls that
                               cannot be resolved at program start-up to be
                               resolved on first reference.

                               Since -B nonfatal suppresses messages about
                               unresolved symbols, also specify -B verbose
                               to display those messages.

                               See the example below.

                          lazydirect
                               Only record direct bind information to shared
                               libraries marked for lazy loading.  See
                               +[no]lazyload.

                          nodelete
                               Mark the shared library so that an explicit
                               unload using dlclose() or shl_load() returns



 Hewlett-Packard Company            - 7 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                               success silently without detaching the shared
                               library from the process. Subsequently, the
                               shared library handle is valid only for
                               shl_findsym().  It stays invalid for dlsym(),
                               dlclose(), and shl_unload() until the next
                               explicit load using shl_load() or dlopen().

                          nodirect
                               Disallow direct binding.  Only a "direct
                               hint" is recorded for references to libraries
                               marked for lazy loading.  This is the default
                               behavior.

                          nonfatal
                               If also using -B immediate, for code symbols
                               that could not be bound at program startup,
                               defer binding them until they are referenced.
                               See description of -B immediate above.

                               Since -B nonfatal suppresses messages about
                               unresolved symbols, also specify -B verbose
                               to display those messages.

                          restricted
                               Causes the search for a symbol definition to
                               be restricted to those symbols that were
                               visible when the library was loaded.

                          symbolic
                               Used only when building a shared library.
                               This option causes all references in a shared
                               library to be resolved internally if
                               possible.  Such internally-resolved symbols
                               are still externally visible.  By default
                               (without the -B symbolic option), references
                               to a symbol in a shared library are resolved
                               to the most visible definition.  The first
                               load module (a.out or shared library) that
                               exports that symbol contains the most visible
                               definition.  More than one load module can
                               define and export the same symbol.
                               References to a symbol in a shared library
                               can be resolved to a definition in another
                               shared library even if that symbol is defined
                               in the shared library.  You can use this
                               option to enforce that all references in the
                               shared library use their own definitions, if
                               defined in the shared library.  See the +e
                               and +ee options for more information about
                               using -B symbolic with those options.




 Hewlett-Packard Company            - 8 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          verbose
                               Display verbose messages when binding
                               symbols. This is the default except when -B
                               nonfatal is specified. In that case, -B
                               verbose must be explicitly specified to get
                               verbose messages.

                          Use the +help option or see the HP-UX Linker and
                          Libraries User's Guide manual for more information
                          on the uses of binding modes.

           -C n           This option is ignored and generates a warning
                          message.

           -D offset      Set (in hexadecimal) the starting address of the
                          data segment.  This option is useful with kernel
                          and embedded applications.  The default address
                          for 64-bit mode is 0x6000000000000000 and the
                          default address for 32-bit mode is 0x40000000.

           -E             Mark all symbols defined by a program for export
                          to shared libraries.  In a +compat mode link, ld
                          marks only those symbols that are actually
                          referenced by a shared library seen at link time.
                          In a +std link, all symbols are exported by
                          default, so -E is not necessary to make symbols
                          visible.  However, it has an additional side
                          effect of identifying all exported symbols as
                          necessary, so that they will not be removed when
                          using dead code elimination (+Oprocelim).

           -Fl            Force load the archive library.  Equivalent to
                          +forceload.

           -Fw            This option is ignored and generates a warning.

           -Fz            This option is accepted and ignored.

           -G             Strip all unloadable data from the output file.
                          This option is typically used to strip debug
                          information and is incompatible with the +ild
                          option.

                          Note:  Use of the -G option might impair or
                          prevent the use of a symbolic debugger on the
                          resulting program.

           -I             Instrument the code to collect profile information
                          upon execution.  When an instrumented program is
                          executed, a profile database file is output (by
                          default, named flow.data).  The profile data



 Hewlett-Packard Company            - 9 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          gathered during program execution can be used in
                          conjunction with the -P option.  The default
                          instrumenter is the dynamic instrumenter
                          /opt/langtools/bin/caliper, but the +instrumenter
                          option can be used to invoke the static
                          instrumenter /opt/langtools/bin/sin instead.

                          This option should not be used with the -P, -O,
                          +ild, or +O options.

                          NOTE: If using +instrumenter sin, the recommended
                          method to instrument your programs is to use your
                          compiler's +I option, rather than the ld -I
                          option.  If you invoke the linker directly, you
                          must pass the -u__sin_core__, -u__sin_init, and
                          -lsin options to the linker.  If you have both an
                          instrumented shared library and an instrumented
                          shared executable that you want to link with that
                          library, you must include the -h__sin_core__ and
                          -h__sin_lookup_ibt options in addition to the -u
                          options.  If using the default or +instrumenter
                          caliper, no additional linker options are needed.

           -L dir         Search for libx.a, libx.sl, or libx.so, in dir
                          before looking in default locations.  You can
                          specify more than one directory, but each must be
                          preceded by the -L option.  The -L option is
                          effective only if it precedes the -l option on the
                          command line.

           -N             In 32-bit mode only, cause the data to be placed
                          immediately following the text, and make the text
                          writable. Files of this type cannot be shared.

           -O             Turn on linker optimizations.  Currently the
                          optimization includes the removal of dead
                          procedures.

                          -O is passed to the linker by the compilers when
                          the +O4 compiler option is selected.

                          This option is incompatible with the +ild option.

                          For more details on linker optimizations use the
                          +help option or see the HP-UX Linker and Libraries
                          User's Guide manual.

           -P             Examine the profile database file produced by an
                          instrumented program (see the -I option) to
                          perform profile based optimizations on the code.
                          This option should not be used with the +ild



 Hewlett-Packard Company           - 10 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          option.

           -Pd            Reorder debuggable functions.  Ordinarily -P does
                          not reorder functions from .o files with debugging
                          information, because reordering renders them nondebuggable.
  This option overrides this and
                          reorders the functions.  Reordering is based on
                          link order file produced from flow.data by
                          default.  If you specify the -Pd option, the
                          linker does not use flow.data for reordering.
                          This option is incompatible with +ild.

                          Note:  Use of the -Pd option might impair or
                          prevent the use of a symbolic debugger on the
                          resulting program.

           -PD filename   Save link order file generated by fdp during
                          linking with -P option into user-specified file.
                          This option is incompatible with the +ild option.

           -PF filename   Indicate to the linker to use the specified file
                          for the link order file instead of generating it
                          using /usr/ccs/bin/fdp.  This option is
                          incompatible with the +ild option.

           -Q             This option is ignored.

           -R offset      Set (in hexadecimal) the starting address of the
                          text (i.e., code) segment.  This option is useful
                          with kernel and embedded applications.  The
                          default address for 64-bit mode is
                          0x4000000000000000 and for 32-mode is 0x04000000.
                          If the -N option is specified, the default is
                          0x1000.

           -S             This option is ignored and generates a warning
                          message.

           -T             This option is ignored.

           -V             Output a message giving information about the
                          version of ld being used.

           -Z             This is the default. Allow run-time dereferencing
                          of null pointers.  See the discussions of -Z and
                          pointers in cc(1).  (This is the complement of the
                          -z option.)

           +allowdups     Allows multiple symbol definitions.  By default,
                          multiple symbol definitions that occur between
                          relocatable objects will result in a fatal error



 Hewlett-Packard Company           - 11 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          condition.  This option suppresses the error
                          condition and allows the first symbol definition
                          to be taken.

           +[no]allowunsats
                          Control unsatisfied symbol error reporting.
                          +allowunsats does not flag errors if the resulting
                          output file has unsatisfied symbols.  This is the
                          default for relocatable links and shared library
                          builds.  +noallowunsats flags an error if the
                          resulting output file has unsatisfied symbols.
                          This is the default for program files.

           +as mode       Control the address space model to be used by the
                          kernel.  Possible values for mode are default,
                          share_magic, exec_magic, shmem_magic, and mpas.
                          The default value is currently equivalent to
                          share_magic.  In order to set the mode to any
                          value other than the default, this option must be
                          used in conjunction with the -N option to ensure
                          that the text and data segments are contiguous.

           +b path_list   Specify a colon-separated list of directories to
                          be searched at program run-time to locate shared
                          libraries needed by the executable output file
                          that were specified with either the -l or -l:
                          options.  This list of directories becomes the
                          embedded path.  If either +b is not used or if you
                          specify a single colon (:) as the argument, ld
                          builds an embedded path using all the directories
                          specified by the -L option(s) and the LPATH
                          environment variable (see the +s option).

           +cdp oldpath:newpath
                          This option is ignored.

           +compat        Turn on compatibility mode in the linker - mimic
                          behavior of PA-RISC 32-bit links.

           +[no]copyobjdebug
                          When you use the +noobjdebug linker option to
                          override the effect of the +objdebug compiler
                          option, the linker omits the +objdebug information
                          from the object files (in addition to copying over
                          the debug information to the output file).
                          However, if any object files were the result of
                          previous -r links, the +objdebug information from
                          these files is not omitted.  The +nocopyobjdebug
                          option, when used in conjunction with the
                          +noobjdebug option, forces the linker to omit
                          +objdebug information from all object files,



 Hewlett-Packard Company           - 12 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          including objects generated with the -r option.
                          +copyobjdebug is the default.

           +[no]defaultrpath
                          +defaultrpath is the default.  Include any paths
                          that are specified with -L in the embedded path,
                          unless you specify the +b option.  If you use +b,
                          only the path list specified by +b is in the
                          embedded path.

                          The +nodefaultrpath option removes all library
                          paths that were specified with the -L option from
                          the embedded path.  The linker searches the
                          library paths specified by the -L option at link
                          time.  At run time, the only library paths
                          searched are those specified by the environment
                          variables LD_LIBRARY_PATH and SHLIB_PATH, library
                          paths specified by the +b linker option, and
                          finally the default library paths.

           +df file       Used together with the -P option, this option
                          specifies that file should be used as the profile
                          database file.  The default value is flow.data.
                          See the discussion of the FLOW_DATA environment
                          variable for more information.  This option is
                          incompatible with the +ild option.

           +dpv           Output information on procedures that were
                          eliminated by procelim.  Equivalent to +vtype
                          procelim.

           +dumpextern filename
                          Valid for executables and shared library links.
                          Instructs the linker to dump all external symbols
                          into the file specified by filename.  This dumps
                          all external symbols referred to within the load
                          module (a.out or shared library) but not defined
                          within the load module into the specified file.
                          You can pass this file back to your compiler using
                          the -Bextern:filename option.  For more
                          information, see the compiler options,
                          -Bextern:filename, -Bhidden, and -Bprotected.

           +e symbol      When building a shared library or program, mark
                          the symbol for export to the dynamic loader.  Only
                          symbols explicitly marked are exported.  When
                          building a shared library, calls to symbols that
                          are not exported are resolved internally.

                          If you use the +e or +ee option with -B symbolic,
                          references to the symbol specified are resolved



 Hewlett-Packard Company           - 13 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          internally if defined.  The runtime behavior may
                          be different from using +e alone.

                          You can specify more than one symbol on the
                          command line with multiple option-symbol pairs,
                          that is, each symbol you specify must be preceded
                          by the +e option.

           +ee symbol     This option is similar to the +e option in that it
                          exports a symbol.  However, unlike the +e option,
                          the +ee option does not alter the visibility of
                          any other symbol in the file. When building a
                          +compat mode executable, by default ld exports
                          only those symbols that are actually referenced by
                          a shared library seen at link time.  The +ee
                          option when specified with +compat, has the effect
                          of exporting the specified symbol without hiding
                          any of the symbols exported by default.  In a +std
                          mode link, all symbols are exported by default, so
                          +ee is not necessary to make a symbol visible.
                          However, it has the additional side effect of
                          identifying the symbol as necessary, so that it
                          will not be removed when using dead code
                          elimination (+Oprocelim).  The +ee option still
                          retains its export behavior if an option such as
                          +hideallsymbols is also given.

                          You can specify more than one symbol on the
                          command line with multiple option-symbol pairs,
                          that is, each symbol you specify must be preceded
                          by the +ee option.

           +fb            Instruct the linker to run the fastbind tool on
                          the executable it has produced.  The executable
                          should be linked with shared libraries. For more
                          details about fastbind(1), use the +help option,
                          or see the HP-UX Linker and Libraries User's Guide
                          manual.  This option is incompatible with the +ild
                          option.

           +fbu           Pass the -u option to the fastbind tool. For more
                          details about fastbind(1), use the +help option,
                          or see the HP-UX Linker and Libraries User's Guide
                          manual.  This option is incompatible with the +ild
                          option.

           +filter shared_library_path
                          Enables the shared library filter mechanism, which
                          allows you to divide a large library into a
                          "filter" and several "implementation" libraries
                          for more efficient organization of shared



 Hewlett-Packard Company           - 14 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          libraries.  shared_library_path specifies the
                          location of the filter library.  See the HP-UX
                          Linker and Libraries User's Guide for more
                          information.

           +fini function_name
                          Specify the terminator function to be invoked in
                          forward order, the order the functions appear left
                          to right on the command line.

                          You can specify more than one terminator function
                          on the command line with multiple option-symbol
                          pairs, that is, each function you specify must be
                          preceded by the +fini option.

           +[no]forceload The default is +noforceload.  The +forceload
                          option loads all object files from archive
                          libraries.  +noforceload loads only the required
                          object files from archive libraries.  The selected
                          mode, either explicitly or by default, remains in
                          effect until you explicitly change it.

           +gst           Enable the global symbol table hash mechanism,
                          used to look up values of symbol import/export
                          entries.  The +gst and related options provide
                          performance enhancements through use of global
                          symbol table which improves searching for exported
                          symbols.  See dld.so(5) and the HP-UX Linker and
                          Libraries Online User Guide for more information.

           +gstbuckets size
                          This option is ignored.

           +gstsize size  Request a particular hash array size using the
                          global symbol table hash mechanism.  The default
                          value is 1103.  The value can be overridden at
                          runtime by setting the _HP_DLDOPTS environment
                          variable to the value -symtab_size prime number.
                          You can set the value using chatr +gstsize size
                          file.

           +h internal_name
                          When building a shared library, record
                          internal_name as the name of the library.  When
                          the library is used to link another executable
                          file (program or shared library), this
                          internal_name is recorded in the library list of
                          the resulting output file instead of the pathname
                          of the input shared library.  That is, if +h is
                          not used, the shared library does not have an
                          internal name and when an executable is built with



 Hewlett-Packard Company           - 15 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          the shared library, the linker records the library
                          name that it looks at.

                          If more than one +h option is seen on the link
                          line, the linker uses the first one and emits a
                          warning message.

           +help          Start the help browser utility HP-UX Linker and
                          Libraries Online User Guide which comes with the
                          HP-UX operating system.  For more information, see
                          to the HP-UX Linker and Libraries User's Guide
                          manual.  See manuals(5) for ordering information.

           +hideallsymbols
                          Prevent all the symbols from being exported unless
                          explicitly exported with the +e.  This option
                          marks all symbols as "local" in the symbol table.
                          See also the -h and +e options.

           +ild           Specify incremental linking.

                          If the output file does not exist, or if it was
                          created without the +ild option, the linker
                          performs an initial incremental link.  The output
                          file produced is suitable for subsequent
                          incremental links.  The incremental link option is
                          valid for both executable and shared library
                          links.

                          The following options are incompatible with the
                          +ild option.  If you specify one of the following
                          incompatible ld option with +ild, the linker emits
                          a warning message and ignores the +ild option.

                          -r   create a relocatable object file.

                          Strip options:
                               -s, -x, and -G strip the output file.

                          Optimization options:
                               -I, -O, -P, -PD, -PF, +df file, +fb, +fbu,
                               +fbs, +pgm name, +Oprocelim

                          The following options are compatible with the +ild
                          option with limitations:

                          -D offset, -R offset
                               Set the origin for the data and text
                               segments. If you change the offset after the
                               initial incremental link, the linker performs
                               an initial incremental link automatically.



 Hewlett-Packard Company           - 16 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



                          -k mapfile
                               Provide a non-default mapfile. The user
                               specified mapfile specifications are
                               permitted with the +ild option. But you
                               should not modify the mapfile after the
                               initial incremental link. If the mapfile is
                               modified after the initial link, an initial
                               incremental link is performed automatically.

           +ildnowarn     Suppress incremental-linking related warnings.  By
                          default, the linker issues all incremental-linking
                          related warnings.  This option is ignored if used
                          without +ild or +ildrelink.

           +ildpad percentage
                          Control the amount of padding percentage the
                          incremental linker allocates, relative to sizes of
                          object file structures being padded. By default
                          the linker allocates less than 20% of padding
                          space.  This option is ignored if used without
                          +ild or +ildrelink.

           +ildrelink     Perform an initial incremental link, regardless of
                          the output load module.

                          In certain situations (for example, internal
                          padding space is exhausted) the incremental linker
                          is forced to perform an initial incremental link.
                          The +ildrelink option allows you to avoid such
                          unexpected initial incremental links by
                          periodically rebuilding the output file.

           +init function_name
                          Specify the initializer function to be invoked in
                          reverse order, the order the functions appear
                          right to left on the command line.

                          You can specify more than one initializer function
                          on the command line with multiple option-symbol
                          pairs, that is, each initializer function you
                          specify must be preceded by the +init option.

           +instrumenter name
                          Specify which instrumenter to use.  Only sin or
                          caliper are recognized.  Default is caliper.  If
                          sin is specified, the linker will invoke
                          /opt/langtools/bin/sin automatically.  If caliper
                          is specified, /opt/langtools/bin/caliper will be
                          automatically invoked by the dynamic loader when
                          the program is executed.




 Hewlett-Packard Company           - 17 -      HP-UX 11i Version 2: Sep 2004






 ld_ia(1)                                                           ld_ia(1)
                        For Itanium(R)-based Systems



           +interp filename
                          Change the dld path to use the program specified
                          by filename for the "interpreter" program as the
                          dynamic loader.  This is useful when using special
                          versions of dld.so for debugging.  The default
                          path is
                          /usr/lib/hpux32/uld.so:/usr/lib/hpux32/dld.so for
                          32-bit programs and
                          /usr/lib/hpux64/uld.so:/usr/lib/hpux64/dld.so for
                          64-bit programs.

           +interposer    Used only when building a shared library. This
                          will create a shared library that can be used for
                          interposition.  When resolving references for an
                          application with direct bind information (see -B
                          direct), the dynamic loader will search interposer
                          libraries first. If the symbol cannot be resolved
                          to any interposing libraries, the direct binding
                          information will be used.

           +k             Direct the linker to only create an executable if
                          there were no errors encountered during the link.
                          If there were errors found (system errors or
                          unresolved references), the output file will be
                          removed.

           +[no]lazyload  Enable [disable] lazy loading of shared libraries.
                          For +lazyload libraries, loading is deferred until
                          a reference is made to that library during
                          execution. Both the +lazyload and +nolazyload
                          options may appear on the link line at the same
                          time.  The mode that is specified, either
                          explicitly or by default, remains on for all
                          subsequent libraries on the link line until the
                          next occurrence of the one of these two options.

                          Libraries satisfying one or more of the following
                          conditions are ineligible for lazy loading:

                          + is a filter library

                          + is accessed via a data reference from another
                             module

                          + is accessed via an indirect function call

                          The linker will silently convert such libraries
                          into +nolazyload libraries.

                          Dependent libraries of +lazyload shared lib

 Similar pages
Name OS Title
abild IRIX ABI link editor
ld.so OpenBSD run-time link-editor
rtld FreeBSD run-time link-editor
btxld FreeBSD link editor for BTX clients
ld.so FreeBSD run-time link-editor
ld-elf.so.1 FreeBSD run-time link-editor
a.out HP-UX assembler and link editor output
a.out IRIX assembler and link editor output
a.out Tru64 Assembler and link editor output
link OpenBSD dynamic loader and link editor interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service