.plt stub for lazy linking, --stub-group-size=N ld switch,
[deliverable/binutils-gdb.git] / ld / ld.texinfo
index e3ecaa48e02d3a8c11e856f793705e4f77e5e82c..0b898ecf35c1e4b36e871f86a90374b6fdfcbdc5 100644 (file)
@@ -692,6 +692,14 @@ with @samp{-Ur}; once the constructor table has been built, it cannot
 be added to.  Use @samp{-Ur} only for the last partial link, and
 @samp{-r} for the others.
 
+@kindex --unique
+@item --unique
+Creates a separate output section for every orphan input section.  This
+option prevents the normal merging of orphan input sections with the same
+name.  An orphan section is one not specifically mentioned in a linker
+script, so this option along with a custom linker script allows any
+selection of input sections to be merged while others are kept separate.
+
 @kindex -v
 @kindex -V
 @kindex --version
@@ -1089,11 +1097,11 @@ Any directories specified by @code{-rpath} options.  The difference
 between @code{-rpath} and @code{-rpath-link} is that directories
 specified by @code{-rpath} options are included in the executable and
 used at runtime, whereas the @code{-rpath-link} option is only effective
-at link time.
+at link time. It is for the native linker only.
 @item
 On an ELF system, if the @code{-rpath} and @code{rpath-link} options
 were not used, search the contents of the environment variable
-@code{LD_RUN_PATH}.
+@code{LD_RUN_PATH}. It is for the native linker only.
 @item
 On SunOS, if the @code{-rpath} option was not used, search any
 directories specified using @code{-L} options.
@@ -1135,22 +1143,23 @@ everything else.  This is to prevent gaps between symbols due to
 alignment constraints.
 
 @kindex --split-by-file
-@item --split-by-file
+@item --split-by-file [@var{size}]
 Similar to @code{--split-by-reloc} but creates a new output section for
-each input file.
+each input file when @var{size} is reached.  @var{size} defaults to a
+size of 1 if not given.
 
 @kindex --split-by-reloc
-@item --split-by-reloc @var{count}
-Trys to creates extra sections in the output file so that no single
+@item --split-by-reloc [@var{count}]
+Tries to creates extra sections in the output file so that no single
 output section in the file contains more than @var{count} relocations.
-This is useful when generating huge relocatable for downloading into
+This is useful when generating huge relocatable files for downloading into
 certain real time kernels with the COFF object file format; since COFF
 cannot represent more than 65535 relocations in a single section.  Note
 that this will fail to work with object file formats which do not
 support arbitrary sections.  The linker will not split up individual
 input sections for redistribution, so if a single input section contains
 more than @var{count} relocations one output section will contain that
-many relocations.
+many relocations.  @var{count} defaults to a value of 32768.
 
 @kindex --stats
 @item --stats
@@ -3895,6 +3904,7 @@ functionality are not listed.
 * H8/300::                      @code{ld} and the H8/300
 * i960::                        @code{ld} and the Intel 960 family
 * ARM::                                @code{ld} and the ARM family
+* HPPA ELF32::                  @code{ld} and HPPA 32-bit ELF
 @ifset TICOFF
 * TI COFF::                     @code{ld} and TI COFF
 @end ifset
@@ -4038,6 +4048,38 @@ But it also sets the bottom bit of the address, so that it can be
 branched to using a BX instruction, and the program will start
 executing in Thumb mode straight away.
 
+@node HPPA ELF32
+@section @code{ld} and HPPA 32-bit ELF support
+@cindex HPPA multiple sub-space stubs
+@kindex --multi-subspace
+When generating a shared library, @code{ld} will by default generate
+import stubs suitable for use with a single sub-space application.
+The @samp{--multi-subspace} switch causes @code{ld} to generate export
+stubs, and different (larger) import stubs suitable for use with
+multiple sub-spaces.
+
+@cindex HPPA stub grouping
+@kindex --stub-group-size=@var{N}
+Long branch stubs and import/export stubs are placed by @code{ld} in
+stub sections located between groups of input sections.
+@samp{--stub-group-size} specifies the maximum size of a group of input
+sections handled by one stub section.  Since branch offsets are signed,
+a stub section may serve two groups of input sections, one group before
+the stub section, and one group after it.  However, when using
+conditional branches that require stubs, it may be better (for branch
+prediction) that stub sections only serve one group of input sections.
+A negative value for @samp{N} chooses this scheme, ensuring that
+branches to stubs always use a negative offset.  Two special values of
+@samp{N} are recognized, @samp{1} and @samp{-1}.  These both instruct
+@code{ld} to automatically size input section groups for the branch types
+detected, with the same behaviour regarding stub placement as other
+positive or negative values of @samp{N} respectively.
+
+Note that @samp{--stub-group-size} does not split input sections.  A
+single input section larger than the group size specified will of course
+create a larger group (of one section).  If input sections are too
+large, it may not be possible for a branch to reach its stub.
+
 @ifset TICOFF
 @node TI COFF
 @section @code{ld}'s support for various TI COFF versions
This page took 0.111699 seconds and 4 git commands to generate.