* ld.texinfo (Options): Add a brief description of the types of
[binutils-gdb.git] / ld / ld.1
diff --git a/ld/ld.1 b/ld/ld.1
index a52975dc00f9131bcf1b1fc5e2b12e6dcc0e956e..79c9f102c042a94969dfbcf1381cb6320c06e142 100644 (file)
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 92, 93, 94, 1995 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation
 .\" See section COPYING for conditions for redistribution
 .TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
 .de BP
@@ -33,6 +33,7 @@ ld \- the GNU linker
 .RB "[\|" "\-c\ "\c
 .I commandfile\c
 \&\|] 
+.RB "[\|" \-\-cref "\|]"
 .RB "[\|" \-d | \-dc | \-dp\c
 \|]
 .br
@@ -45,9 +46,19 @@ ld \- the GNU linker
 .I entry\c
 \&\|] 
 .RB "[\|" \-embedded\-relocs "\|]"
-.RB "[\|" \-F "\|]" 
+.RB "[\|" \-E "\|]" 
+.RB "[\|" \-export\-dynamic "\|]"
+.RB "[\|" "\-f\ "\c
+.I name\c
+\&\|]
+.RB "[\|" "\-\-auxiliary\ "\c
+.I name\c
+\&\|]
 .RB "[\|" "\-F\ "\c
-.I format\c
+.I name\c
+\&\|]
+.RB "[\|" "\-\-filter\ "\c
+.I name\c
 \&\|]
 .RB "[\|" "\-format\ "\c
 .I input-format\c
@@ -56,6 +67,12 @@ ld \- the GNU linker
 .RB "[\|" \-G
 .I size\c
 \&\|]
+.RB "[\|" "\-h\ "\c
+.I name\c
+\&\|]
+.RB "[\|" "\-soname\ "\c
+.I name\c
+\&\|]
 .RB "[\|" \-\-help "\|]"
 .RB "[\|" \-i "\|]"
 .RB "[\|" \-l\c
@@ -74,6 +91,7 @@ ld \- the GNU linker
 .RB "[\|" \-n | \-N "\|]" 
 .RB "[\|" \-noinhibit-exec "\|]" 
 .RB "[\|" \-no\-keep\-memory "\|]" 
+.RB "[\|" \-no\-warn\-mismatch "\|]" 
 .RB "[\|" "\-oformat\ "\c
 .I output-format\c
 \&\|] 
@@ -118,8 +136,14 @@ ld \- the GNU linker
 .RB "[\|" \-\-version "\|]"
 .RB "[\|" \-warn\-common "\|]" 
 .RB "[\|" \-warn\-constructors "\|]" 
+.RB "[\|" \-warn\-multiple\-gp "\|]" 
 .RB "[\|" \-warn\-once "\|]" 
+.RB "[\|" \-warn\-section\-align "\|]" 
 .RB "[\|" \-\-whole\-archive "\|]" 
+.RB "[\|" \-\-no\-whole\-archive "\|]" 
+.RB "[\|" "\-\-wrap\ "\c
+.I symbol\c
+\&\|]
 .RB "[\|" \-X "\|]" 
 .RB "[\|" \-x "\|]" 
 .ad b
@@ -401,6 +425,12 @@ line by bracketing it between `\|\c
 .B }\c
 \|' characters.
 
+.TP
+.B \-\-cref
+Output a cross reference table.  If a linker map file is being
+generated, the cross reference table is printed to the map file.
+Otherwise, it is printed on the standard output.
+
 .TP
 .B \-d 
 .TP
@@ -458,28 +488,33 @@ was statically initialized to pointer values.  See the code in
 testsuite/ld-empic for details.
 
 .TP
-.B \-F
+.B \-E
 .TP
-.BI "-F" "format"
-Some older linkers used this option throughout a compilation toolchain
-for specifying object-file format for both input and output object
-files.  \c
-.B ld\c
-\&'s mechanisms (the \c
-.B \-b\c
-\& or \c
-.B \-format\c
-\& options
-for input files, the \c
-.B TARGET\c
-\& command in linker scripts for output
-files, the \c
-.B GNUTARGET\c
-\& environment variable) are more flexible, but
-but it accepts (and ignores) the \c
-.B \-F\c
-\& option flag for compatibility
-with scripts written to call the old linker.
+.B \-export\-dynamic
+When creating an ELF file, add all symbols to the dynamic symbol table.
+Normally, the dynamic symbol table contains only symbols which are used
+by a dynamic object.  This option is needed for some uses of
+.I dlopen.
+
+.TP
+.BI "-f " "name"
+.TP
+.BI "--auxiliary " "name"
+When creating an ELF shared object, set the internal DT_AUXILIARY field
+to the specified name.  This tells the dynamic linker that the symbol
+table of the shared object should be used as an auxiliary filter on the
+symbol table of the shared object
+.I name.
+
+.TP
+.BI "-F " "name"
+.TP
+.BI "--filter " "name"
+When creating an ELF shared object, set the internal DT_FILTER field to
+the specified name.  This tells the dynamic linker that the symbol table
+of the shared object should be used as a filter on the symbol table of
+the shared object
+.I name.
 
 .TP
 .BI "\-format " "input\-format"
@@ -500,6 +535,16 @@ to
 .I size
 under MIPS ECOFF.  Ignored for other object file formats.
 
+.TP
+.BI "-h " "name"
+.TP
+.BI "-soname " "name"
+When creating an ELF shared object, set the internal DT_SONAME field to
+the specified name.  When an executable is linked with a shared object
+which has a DT_SONAME field, then when the executable is run the dynamic
+linker will attempt to load the shared object specified by the DT_SONAME
+field rather than the using the file name given to the linker.
+
 .TP
 .B \-\-help
 Print a summary of the command-line options on the standard output and exit.
@@ -621,6 +666,16 @@ linker to instead optimize for memory usage, by rereading the symbol
 tables as necessary.  This may be required if the linker runs out of
 memory space while linking a large executable.
 
+.TP
+.B \-no\-warn\-mismatch
+Normally the linker will give an error if you try to link together
+input files that are mismatched for some reason, perhaps because they
+have been compiled for different processors or for different
+endiannesses.  This option tells the linker that it should silently
+permit such possible errors.  This option should only be used with
+care, in cases when you have taken some special action that ensures
+that the linker errors are inappropriate.
+
 .TP
 .BI "\-o " "output"
 .I output\c
@@ -709,7 +764,12 @@ option is also used when locating shared objects which are needed by
 shared objects explicitly included in the link; see the description of
 the
 .B \-rpath\-link
-option.
+option.  If
+.B \-rpath
+is not used when linking an ELF executable, the contents of the
+environment variable
+.B LD_RUN_PATH
+will be used if it is defined.
 
 The
 .B \-rpath
@@ -717,8 +777,9 @@ option may also be used on SunOS.  By default, on SunOS, the linker
 will form a runtime search patch out of all the
 .B \-L
 options it is given.  If a
-.B \-rpath option is used, the runtime search path
-will be formed exclusively using the
+.B \-rpath
+option is used, the runtime search path will be formed exclusively
+using the
 .B \-rpath
 options, ignoring
 the
@@ -892,18 +953,51 @@ Warn if any global constructors are used.  This is only useful for a
 few object file formats.  For formats like COFF or ELF, the linker can
 not detect the use of global constructors.
 
+.TP
+.B \-warn\-multiple\-gp
+Warn if the output file requires multiple global-pointer values.  This
+option is only meaningful for certain processors, such as the Alpha.
+
 .TP
 .B \-warn\-once
 Only warn once for each undefined symbol, rather than once per module
 which refers to it.
 
+.TP
+.B \-warn\-section\-align
+Warn if the address of an output section is changed because of
+alignment.  Typically, the alignment will be set by an input section.
+The address will only be changed if it not explicitly specified; that
+is, if the SECTIONS command does not specify a start address for the
+section.
+
 .TP
 .B \-\-whole\-archive
-For each archive mentioned on the command line, include every object
-file in the archive in the link, rather than searching the archive for
-the required object files.  This is normally used to turn an archive
-file into a shared library, forcing every object to be included in the
-resulting shared library.
+For each archive mentioned on the command line after the
+.B \-\-whole\-archive
+option, include every object file in the archive in the link, rather
+than searching the archive for the required object files.  This is
+normally used to turn an archive file into a shared library, forcing
+every object to be included in the resulting shared library.
+
+.TP
+.B \-\-no\-whole\-archive
+Turn off the effect of the
+.B \-\-whole\-archive
+option for archives which appear later on the command line.
+
+.TP
+.BI "--wrap " "symbol"
+Use a wrapper function for 
+.I symbol.
+Any undefined reference to
+.I symbol
+will be resolved to
+.BI "__wrap_" "symbol".
+Any undefined reference to
+.BI "__real_" "symbol"
+will be resolved to
+.I symbol.
 
 .TP
 .B \-X