add ld-versados.
[deliverable/binutils-gdb.git] / ld / ld.1
diff --git a/ld/ld.1 b/ld/ld.1
index 6817483aafb7244e64925b3e87610dc2120d3285..feacea53bdce5cb9babd8c26258a5817f5fccecf 100644 (file)
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -42,6 +42,7 @@ ld \- the GNU linker
 .RB "[\|" "\-e\ "\c
 .I entry\c
 \&\|] 
+.RB "[\|" \-embedded\-relocs "\|]"
 .RB "[\|" \-F "\|]" 
 .RB "[\|" "\-F\ "\c
 .I format\c
@@ -53,6 +54,7 @@ ld \- the GNU linker
 .RB "[\|" \-G\c
 .I size\c
 \&\|]
+.RB "[\|" \-\-help "\|]"
 .RB "[\|" \-i "\|]"
 .RB "[\|" \-l\c
 .I ar\c
@@ -69,6 +71,10 @@ ld \- the GNU linker
 \&\|] 
 .RB "[\|" \-n | \-N "\|]" 
 .RB "[\|" \-noinhibit-exec "\|]" 
+.RB "[\|" \-no\-keep\-memory "\|]" 
+.RB "[\|" "\-oformat\ "\c
+.I output-format\c
+\&\|] 
 .RB "[\|" "\-R\ "\c
 .I filename\c
 \&\|]
@@ -76,6 +82,11 @@ ld \- the GNU linker
 .RB "[\|" \-r | \-Ur "\|]" 
 .RB "[\|" \-S "\|]" 
 .RB "[\|" \-s "\|]" 
+.RB "[\|" \-sort\-common "\|]" 
+.RB "[\|" \-split\-by\-reloc\ "\c
+.I count\c
+\&\|]
+.RB "[\|" \-split\-by\-file "\|]" 
 .RB "[\|" "\-T\ "\c
 .I commandfile\c
 \&\|]  
@@ -94,11 +105,13 @@ ld \- the GNU linker
 \&]
 .RB "[\|" \-V "\|]"
 .RB "[\|" \-v "\|]"
+.RB "[\|" \-\-verbose "\|]"
+.RB "[\|" \-\-version "\|]"
+.RB "[\|" \-warn\-common "\|]" 
+.RB "[\|" \-warn\-once "\|]" 
+.RB "[\|" \-\-whole\-archive "\|]" 
 .RB "[\|" \-X "\|]" 
 .RB "[\|" \-x "\|]" 
-.RB "[\|" { \c
-.I script\c
-.BR } "\|]" 
 .ad b
 .hy 1
 .SH DESCRIPTION
@@ -302,7 +315,7 @@ use will add another pair of name variants to search for when \c
 specifies a library.
 
 .TP
-.BI "-b " "input-format"\c
+.BI "\-b " "input-format"\c
 \&
 Specify the binary format for input object files that follow this option
 on the command line.  You don't usually need to specify this, as
@@ -317,7 +330,8 @@ name of a particular format supported by the BFD libraries.
 .B \-format \c
 .I input-format\c
 \&\c
-\& has the same effect.
+\& has the same effect, as does the script command
+.BR TARGET .
 
 You may want to use this option if you are linking files with an unusual
 binary format.  You can also use \c
@@ -346,7 +360,7 @@ but has no effect on \c
 \&.
 
 .TP
-.BI "-c " "commandfile"\c
+.BI "\-c " "commandfile"\c
 \&
 Directs \c
 .B ld\c
@@ -419,6 +433,16 @@ program, rather than the default entry point.  for a
 discussion of defaults and other ways of specifying the
 entry point.
 
+.TP
+.B \-embedded\-relocs
+This option is only meaningful when linking MIPS embedded PIC code,
+generated by the
+.B \-membedded\-pic
+option to the GNU compiler and assembler.  It causes the linker to
+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 \-F
 .TP
@@ -445,12 +469,12 @@ but it accepts (and ignores) the \c
 with scripts written to call the old linker.
 
 .TP
-.BI "-format " "input-format"\c
+.BI "\-format " "input\-format"\c
 \&
 Synonym for \c
 .B \-b\c
 \& \c
-.I input-format\c
+.I input\-format\c
 \&.
 
 .TP
@@ -464,6 +488,15 @@ to
 .I size
 under MIPS ECOFF.  Ignored for other object file formats.
 
+.TP
+.B \-\-help
+Print a summary of the command-line options on the standard output and exit.
+This option and
+.B \-\-version
+begin with two dashes instead of one
+for compatibility with other GNU programs.  The other options start with
+only one dash for compatibility with other linkers.
+
 .TP
 .B \-i
 Perform an incremental link (same as option \c
@@ -471,7 +504,7 @@ Perform an incremental link (same as option \c
 \&).
 
 .TP
-.BI "-l" "ar"\c
+.BI "\-l" "ar"\c
 \& 
 Add an archive file \c
 .I ar\c
@@ -489,7 +522,7 @@ path-list for occurrences of \c
 specified.
 
 .TP
-.BI "-L" "searchdir"\c
+.BI "\-L" "searchdir"\c
 \& 
 This command adds path \c
 .I searchdir\c
@@ -534,8 +567,10 @@ common storage allocation.
 Emulate the
 .I emulation
 linker.  You can list the available emulations with the
+.I \-\-verbose
+or
 .I \-V
-option.  This option overrides the compiled-in default, which is the
+options.  This option overrides the compiled-in default, which is the
 system for which you configured
 .BR ld .
 
@@ -564,13 +599,21 @@ sets the text segment to be read only, and \c
 if possible.
 
 .TP
-.B \-noinhibit-exec
+.B \-noinhibit\-exec
 Normally, the linker will not produce an output file if it encounters
 errors during the link process.  With this flag, you can specify that
 you wish the output file retained even after non-fatal errors.
 
 .TP
-.BI "-o " "output"\c
+.B \-no\-keep\-memory
+The linker normally optimizes for speed over memory usage by caching
+the symbol tables of input files in memory.  This option tells the
+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
+.BI "\-o " "output"\c
 \&
 .I output\c
 \&
@@ -587,7 +630,23 @@ script command \c
 \& can also specify the output file name.
 
 .TP
-.BI "-R " "filename"\c
+.BI "\-oformat " "output\-format"\c
+\&
+Specify the binary format for the output object file.
+You don't usually need to specify this, as
+\c
+.B ld\c
+\& is configured to produce as a default output format the most
+usual format on each machine.  \c
+.I output-format\c
+\& is a text string, the
+name of a particular format supported by the BFD libraries.  
+The script command
+.B OUTPUT_FORMAT
+can also specify the output format, but this option overrides it.
+
+.TP
+.BI "\-R " "filename"\c
 \&
 .I file\c
 \&
@@ -646,32 +705,43 @@ Omits debugger symbol information (but not all symbols) from the output file.
 Omits all symbol information from the output file.
 
 .TP
-.BI "{ " "script" " }"
-You can, if you wish, include a script of linker commands directly in
-the command line instead of referring to it via an input file.  When the
-character `\|\c
-.B {\c
-\|' occurs on the command line, the linker switches to
-interpreting the command language until the end of the list of commands
-is reached\(em\&flagged with a closing brace `\|\c
-.B }\c
-\|'.  Other command-line
-options will not be recognized while parsing the script.
-See the `\|\c
-.B ld\c
-\|' entry in `\|\c
-.B info\c
-\|', or the manual
-.I
-ld: the GNU linker
-\&, for a description of the command language.
+.B \-sort\-common
+Normally, when
+.B ld
+places the global common symbols in the appropriate output sections,
+it sorts them by size.  First come all the one byte symbols, then all
+the two bytes, then all the four bytes, and then everything else.
+This is to prevent gaps between symbols due to
+alignment constraints.  This option disables that sorting.
+
+.TP
+.B \-split\-by\-reloc\ \fIcount
+Trys to creates extra sections in the output file so that no single
+output section in the file contains more than
+.I count
+relocations.
+This is useful when generating huge relocatable 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
+.I count
+relocations one output section will contain that many relocations.
+
+.TP
+.B \-split\-by\-file
+Similar to
+.B \-split\-by\-reloc
+but creates a new output section for each input file.
 
 .TP
-.BI "-Tbss " "org"\c
+.BI "\-Tbss " "org"\c
 .TP
-.BI "-Tdata " "org"\c
+.BI "\-Tdata " "org"\c
 .TP
-.BI "-Ttext " "org"\c
+.BI "\-Ttext " "org"\c
 Use \c
 .I org\c
 \& as the starting address for\(em\&respectively\(em\&the
@@ -687,10 +757,10 @@ Use \c
 \& must be a hexadecimal integer.
 
 .TP
-.BI "-T " "commandfile"\c
+.BI "\-T " "commandfile"\c
 \&
 .TP
-.BI "-T" "commandfile"\c
+.BI "\-T" "commandfile"\c
 Equivalent to \c
 .B \-c \c
 .I commandfile\c
@@ -705,7 +775,7 @@ Prints names of input files as \c
 \& processes them.
 
 .TP
-.BI "-u " "sym"
+.BI "\-u " "sym"
 Forces \c
 .I sym\c
 \& to be entered in the output file as an undefined symbol.
@@ -733,40 +803,57 @@ turn serve as input to \c
 \&.
 
 .TP
-.B \-V
+.B \-\-verbose
 Display the version number for \c
 .B ld
 and list the supported emulations.
-Print which input files can and can not be opened.
+Display which input files can and can not be opened.
 
 .TP
-.B \-v
+.B \-v, \-V
 Display the version number for \c
 .B ld\c
 \&.
-Print which input files can and can not be opened.
+The
+.B \-V
+option also lists the supported emulations.
+
+.TP
+.B \-\-version
+Display the version number for \c
+.B ld
+and exit.
+
+.TP
+.B \-warn\-common
+Warn when a common symbol is combined with another common symbol or with
+a symbol definition.  Unix linkers allow this somewhat sloppy practice,
+but linkers on some other operating systems do not.  This option allows
+you to find potential problems from combining global symbols.
+
+.TP
+.B \-warn\-once
+Only warn once for each undefined symbol, rather than once per module
+which refers to it.
+
+.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.
 
 .TP
 .B \-X 
-If \c
-.B \-s\c
-\& or \c
-.B \-S\c
-\& is also specified, delete only local symbols
-beginning with `\|\c
+Delete all temporary local symbols.  For most targets, this is all local
+symbols whose names begin with `\|\c
 .B L\c
 \|'.
 
 .TP
 .B \-x
-If \c
-.B \-s\c
-\& or \c
-.B \-S\c
-\& is also specified, delete all local symbols,
-not just those beginning with `\|\c
-.B L\c
-\|'.
+Delete all local symbols.
 
 .PP
 
This page took 0.044304 seconds and 4 git commands to generate.