add MAINTAINERS files
[binutils-gdb.git] / ld / ld.1
diff --git a/ld/ld.1 b/ld/ld.1
index ccc47dda63f90bf09798aafdc20f15d550d604e0..129d91e81ea2f3992a05249609dc85c685a9b14c 100644 (file)
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation
+.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation
 .\" See section COPYING for conditions for redistribution
 .TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
 .de BP
@@ -33,22 +33,34 @@ ld \- the GNU linker
 .RB "[\|" "\-c\ "\c
 .I commandfile\c
 \&\|] 
+.RB "[\|" \-\-cref "\|]"
 .RB "[\|" \-d | \-dc | \-dp\c
 \|]
 .br
 .RB "[\|" "\-defsym\ "\c
 .I symbol\c
-\& = \c
+\&=\c
 .I expression\c
 \&\|]
+.RB "[\|" \-\-demangle "\|]"
+.RB "[\|" \-\-no\-demangle "\|]"
 .RB "[\|" "\-e\ "\c
 .I entry\c
 \&\|] 
 .RB "[\|" \-embedded\-relocs "\|]"
+.RB "[\|" \-E "\|]" 
 .RB "[\|" \-export\-dynamic "\|]"
-.RB "[\|" \-F "\|]" 
+.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
@@ -57,6 +69,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
@@ -75,6 +93,10 @@ ld \- the GNU linker
 .RB "[\|" \-n | \-N "\|]" 
 .RB "[\|" \-noinhibit-exec "\|]" 
 .RB "[\|" \-no\-keep\-memory "\|]" 
+.RB "[\|" \-no\-warn\-mismatch "\|]" 
+.RB "[\|" \-O\c
+.I level\c
+\&\|]
 .RB "[\|" "\-oformat\ "\c
 .I output-format\c
 \&\|] 
@@ -100,6 +122,11 @@ ld \- the GNU linker
 .RB "[\|" "\-T\ "\c
 .I commandfile\c
 \&\|]  
+.RB "[\|" "\-\-section\-start\ "\c
+.I sectionname\c
+\&=\c
+.I sectionorg\c
+\&\|]
 .RB "[\|" "\-Ttext\ "\c
 .I textorg\c
 \&\|] 
@@ -121,6 +148,7 @@ ld \- the GNU linker
 .RB "[\|" \-warn\-constructors "\|]" 
 .RB "[\|" \-warn\-multiple\-gp "\|]" 
 .RB "[\|" \-warn\-once "\|]" 
+.RB "[\|" \-warn\-section\-align "\|]" 
 .RB "[\|" \-\-whole\-archive "\|]" 
 .RB "[\|" \-\-no\-whole\-archive "\|]" 
 .RB "[\|" "\-\-wrap\ "\c
@@ -230,8 +258,9 @@ The exceptions\(em\&which may meaningfully be used more than once\(em\&are
 .B \-format\c
 \&), \c
 .B \-defsym\c
-\&,
-\c
+\&, \c
+.B \-\-section\-start\c
+\&, \c
 .B \-L\c
 \&, \c
 .B \-l\c
@@ -407,6 +436,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
@@ -425,7 +460,7 @@ specified (\c
 \& has the same effect.
 
 .TP
-.BI "-defsym " "symbol" "\fR = \fP" expression
+.BI "-defsym " "symbol" "\fR=\fP" expression
 Create a global symbol in the output file, containing the absolute
 address given by \c
 .I expression\c
@@ -443,13 +478,30 @@ symbol, or use \c
 constants or symbols.  If you need more elaborate expressions, consider
 using the linker command language from a script.
 
+.TP
+.B \-\-demangle
+.TP
+.B \-\-no\-demangle
+These options control whether to demangle symbol names in error
+messages and other output.  When the linker is told to demangle, it
+tries to present symbol names in a readable fashion: it strips leading
+underscores if they are used by the object file format, and converts
+C++ mangled symbol names into user readable names.  The linker will
+demangle by default unless the environment variable
+.B COLLECT_NO_DEMANGLE
+is set.  These options may be used to override the default.
+
 .TP
 .BI "-e " "entry"\c
 \& 
 Use \c
 .I entry\c
 \& as the explicit symbol for beginning execution of your
-program, rather than the default entry point.  for a
+program, rather than the default entry point.  See the `\|\c
+.B ld\c
+\|' entry in `\|\c
+.B info\c
+\|' for a
 discussion of defaults and other ways of specifying the
 entry point.
 
@@ -463,6 +515,8 @@ create a table which may be used at runtime to relocate any data which
 was statically initialized to pointer values.  See the code in
 testsuite/ld-empic for details.
 
+.TP
+.B \-E
 .TP
 .B \-export\-dynamic
 When creating an ELF file, add all symbols to the dynamic symbol table.
@@ -471,28 +525,24 @@ by a dynamic object.  This option is needed for some uses of
 .I dlopen.
 
 .TP
-.B \-F
+.BI "-f " "name"
 .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.
+.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"
@@ -513,6 +563,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.
@@ -634,6 +694,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
@@ -647,6 +717,16 @@ script command \c
 .B OUTPUT\c
 \& can also specify the output file name.
 
+.TP
+.BI "\-O" "level"
+Generate optimized output files.  This might use significantly more
+time and therefore probably should be enabled only for generating the
+final binary.
+\c
+.I level\c
+\& is supposed to be a numeric value.  Any value greater than zero enables
+the optimizations.
+
 .TP
 .BI "\-oformat " "output\-format"
 Specify the binary format for the output object file.
@@ -732,7 +812,7 @@ will be used if it is defined.
 The
 .B \-rpath
 option may also be used on SunOS.  By default, on SunOS, the linker
-will form a runtime search patch out of all the
+will form a runtime search path out of all the
 .B \-L
 options it is given.  If a
 .B \-rpath
@@ -815,6 +895,20 @@ Similar to
 .B \-split\-by\-reloc
 but creates a new output section for each input file.
 
+.TP
+.BI "--section-start " "sectionname" "\fR=\fP"org
+Locate a section in the output file at the absolute
+address given by \c
+.I org\c
+\&.  \c
+\c
+.I org\c
+\& must be a hexadecimal integer.
+You may use this option as many
+times as necessary to locate multiple sections in the command
+line.  If you need more elaborate expressions, consider
+using the linker command language from a script.
+
 .TP
 .BI "\-Tbss " "org"\c
 .TP
@@ -832,7 +926,7 @@ Use \c
 .B text\c
 \& segment of the output file.
 \c
-.I textorg\c
+.I org\c
 \& must be a hexadecimal integer.
 
 .TP
@@ -921,6 +1015,14 @@ option is only meaningful for certain processors, such as the Alpha.
 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 after the
@@ -1015,7 +1117,7 @@ The GNU Binary Utilities\c
 , Roland H. Pesch.
 
 .SH COPYING
-Copyright (c) 1991, 1992 Free Software Foundation, Inc.
+Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
 .PP
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice