Convert i960 COFF to use COFF backend linker.
[deliverable/binutils-gdb.git] / ld / ld.1
CommitLineData
a89d9f5b 1.\" Copyright (c) 1991, 92, 93, 94, 1995 Free Software Foundation
0e166a63
RP
2.\" See section COPYING for conditions for redistribution
3.TH ld 1 "17 August 1992" "cygnus support" "GNU Development Tools"
4.de BP
5.sp
6.ti \-.2i
7\(**
8..
9
10.SH NAME
11ld \- the GNU linker
12
13.SH SYNOPSIS
14.hy 0
15.na
16.TP
17.B ld
18.RB "[\|" \-o "
19.I output\c
20\&\|] \c
8ddef552 21.I objfile\c
0e166a63
RP
22\&.\|.\|.
23.br
24.RB "[\|" \-A\c
25.I architecture\c
26\&\|]
27.RB "[\|" "\-b\ "\c
28.I input-format\c
29\&\|]
30.RB "[\|" \-Bstatic "\|]"
4551e108
ILT
31.RB "[\|" \-Bdynamic "\|]"
32.RB "[\|" \-Bsymbolic "\|]"
0e166a63
RP
33.RB "[\|" "\-c\ "\c
34.I commandfile\c
35\&\|]
36.RB "[\|" \-d | \-dc | \-dp\c
37\|]
38.br
39.RB "[\|" "\-defsym\ "\c
40.I symbol\c
41\& = \c
42.I expression\c
43\&\|]
44.RB "[\|" "\-e\ "\c
45.I entry\c
46\&\|]
39a6e282 47.RB "[\|" \-embedded\-relocs "\|]"
0e166a63
RP
48.RB "[\|" \-F "\|]"
49.RB "[\|" "\-F\ "\c
50.I format\c
51\&\|]
52.RB "[\|" "\-format\ "\c
53.I input-format\c
54\&\|]
55.RB "[\|" \-g "\|]"
8ddef552
DM
56.RB "[\|" \-G\c
57.I size\c
58\&\|]
bf065bfd 59.RB "[\|" \-\-help "\|]"
0e166a63
RP
60.RB "[\|" \-i "\|]"
61.RB "[\|" \-l\c
62.I ar\c
63\&\|]
64.RB "[\|" \-L\c
65.I searchdir\c
66\&\|]
8ddef552 67.RB "[\|" \-M "\|]"
d18a4527
DM
68.RB "[\|" \-Map\c
69.I mapfile\c
70\&\|]
8ddef552
DM
71.RB "[\|" \-m\c
72.I emulation\c
73\&\|]
0e166a63
RP
74.RB "[\|" \-n | \-N "\|]"
75.RB "[\|" \-noinhibit-exec "\|]"
e920526d 76.RB "[\|" \-no\-keep\-memory "\|]"
346535cc
DM
77.RB "[\|" "\-oformat\ "\c
78.I output-format\c
79\&\|]
0e166a63
RP
80.RB "[\|" "\-R\ "\c
81.I filename\c
82\&\|]
83.RB "[\|" \-relax "\|]"
84.RB "[\|" \-r | \-Ur "\|]"
85.RB "[\|" \-S "\|]"
86.RB "[\|" \-s "\|]"
4551e108 87.RB "[\|" \-shared "\|]"
2a28d8b0 88.RB "[\|" \-sort\-common "\|]"
ec586565
ILT
89.RB "[\|" \-split\-by\-reloc\ "\c
90.I count\c
91\&\|]
92.RB "[\|" \-split\-by\-file "\|]"
0e166a63
RP
93.RB "[\|" "\-T\ "\c
94.I commandfile\c
95\&\|]
96.RB "[\|" "\-Ttext\ "\c
97.I textorg\c
98\&\|]
99.RB "[\|" "\-Tdata\ "\c
100.I dataorg\c
101\&\|]
102.RB "[\|" "\-Tbss\ "\c
103.I bssorg\c
104\&\|]
105.RB "[\|" \-t "\|]"
106.RB "[\|" "\-u\ "\c
107.I sym\c
108\&]
8ddef552 109.RB "[\|" \-V "\|]"
0e166a63 110.RB "[\|" \-v "\|]"
a82ae15d 111.RB "[\|" \-\-verbose "\|]"
bf065bfd 112.RB "[\|" \-\-version "\|]"
2a28d8b0 113.RB "[\|" \-warn\-common "\|]"
a89d9f5b 114.RB "[\|" \-warn\-constructors "\|]"
809ee7e0 115.RB "[\|" \-warn\-once "\|]"
ee499d81 116.RB "[\|" \-\-whole\-archive "\|]"
0e166a63
RP
117.RB "[\|" \-X "\|]"
118.RB "[\|" \-x "\|]"
0e166a63
RP
119.ad b
120.hy 1
121.SH DESCRIPTION
122\c
123.B ld\c
124\& combines a number of object and archive files, relocates
125their data and ties up symbol references. Often the last step in
126building a new compiled program to run is a call to \c
127.B ld\c
128\&.
129
130\c
131.B ld\c
132\& accepts Linker Command Language files
133to provide explicit and total control over the linking process.
134This man page does not describe the command language; see the `\|\c
135.B ld\c
136\|' entry in `\|\c
137.B info\c
138\|', or the manual
139.I
140ld: the GNU linker
141\&, for full details on the command language and on other aspects of
142the GNU linker.
143
144This version of \c
145.B ld\c
146\& uses the general purpose BFD libraries
147to operate on object files. This allows \c
148.B ld\c
149\& to read, combine, and
150write object files in many different formats\(em\&for example, COFF or
151\c
152.B a.out\c
153\&. Different formats may be linked together to produce any
154available kind of object file. You can use `\|\c
155.B objdump \-i\c
156\|' to get a list of formats supported on various architectures; see
157.BR objdump ( 1 ).
158
159Aside from its flexibility, the GNU linker is more helpful than other
160linkers in providing diagnostic information. Many linkers abandon
161execution immediately upon encountering an error; whenever possible,
162\c
163.B ld\c
164\& continues executing, allowing you to identify other errors
165(or, in some cases, to get an output file in spite of the error).
166
167The GNU linker \c
168.B ld\c
169\& is meant to cover a broad range of situations,
170and to be as compatible as possible with other linkers. As a result,
171you have many choices to control its behavior through the command line,
172and through environment variables.
173
174.SH OPTIONS
175The plethora of command-line options may seem intimidating, but in
176actual practice few of them are used in any particular context.
177For instance, a frequent use of \c
178.B ld\c
179\& is to link standard Unix
180object files on a standard, supported Unix system. On such a system, to
181link a file \c
182.B hello.o\c
183\&:
184.sp
185.br
186$\ ld\ \-o\ output\ /lib/crt0.o\ hello.o\ \-lc
187.br
188.sp
189This tells \c
190.B ld\c
191\& to produce a file called \c
192.B output\c
193\& as the
194result of linking the file \c
195.B /lib/crt0.o\c
196\& with \c
197.B hello.o\c
198\& and
199the library \c
200.B libc.a\c
201\& which will come from the standard search
202directories.
203
204The command-line options to \c
205.B ld\c
206\& may be specified in any order, and
207may be repeated at will. For the most part, repeating an option with a
208different argument will either have no further effect, or override prior
209occurrences (those further to the left on the command line) of an
210option.
211
212The exceptions\(em\&which may meaningfully be used more than once\(em\&are
213\c
214.B \-A\c
215\&, \c
216.B \-b\c
217\& (or its synonym \c
218.B \-format\c
219\&), \c
220.B \-defsym\c
221\&,
222\c
223.B \-L\c
224\&, \c
225.B \-l\c
226\&, \c
227.B \-R\c
228\&, and \c
229.B \-u\c
230\&.
231
232The list of object files to be linked together, shown as \c
8ddef552 233.I objfile\c
0e166a63
RP
234\&,
235may follow, precede, or be mixed in with command-line options; save that
236an \c
8ddef552 237.I objfile\c
0e166a63
RP
238\& argument may not be placed between an option flag and
239its argument.
240
241Usually the linker is invoked with at least one object file, but other
242forms of binary input files can also be specified with \c
243.B \-l\c
244\&,
245\c
246.B \-R\c
247\&, and the script command language. If \c
248.I no\c
249\& binary input
250files at all are specified, the linker does not produce any output, and
251issues the message `\|\c
252.B No input files\c
253\|'.
254
255Option arguments must either follow the option letter without intervening
256whitespace, or be given as separate arguments immediately following the
257option that requires them.
258
0e166a63
RP
259.TP
260.BI "-A" "architecture"\c
261\&
262In the current release of \c
263.B ld\c
264\&, this option is useful only for the
265Intel 960 family of architectures. In that \c
266.B ld\c
267\& configuration, the
268\c
269.I architecture\c
270\& argument is one of the two-letter names identifying
271members of the 960 family; the option specifies the desired output
272target, and warns of any incompatible instructions in the input files.
273It also modifies the linker's search strategy for archive libraries, to
274support the use of libraries specific to each particular
275architecture, by including in the search loop names suffixed with the
276string identifying the architecture.
277
278For example, if your \c
279.B ld\c
280\& command line included `\|\c
281.B \-ACA\c
282\|' as
283well as `\|\c
284.B \-ltry\c
285\|', the linker would look (in its built-in search
286paths, and in any paths you specify with \c
287.B \-L\c
288\&) for a library with
289the names
290.sp
291.br
292try
293.br
294libtry.a
295.br
296tryca
297.br
298libtryca.a
299.br
300.sp
301
302The first two possibilities would be considered in any event; the last
303two are due to the use of `\|\c
304.B \-ACA\c
305\|'.
306
307Future releases of \c
308.B ld\c
309\& may support similar functionality for
310other architecture families.
311
312You can meaningfully use \c
313.B \-A\c
314\& more than once on a command line, if
315an architecture family allows combination of target architectures; each
316use will add another pair of name variants to search for when \c
317.B \-l\c
318\&
319specifies a library.
320
321.TP
2a28d8b0 322.BI "\-b " "input-format"\c
0e166a63
RP
323\&
324Specify the binary format for input object files that follow this option
325on the command line. You don't usually need to specify this, as
326\c
327.B ld\c
328\& is configured to expect as a default input format the most
329usual format on each machine. \c
330.I input-format\c
331\& is a text string, the
332name of a particular format supported by the BFD libraries.
333\c
334.B \-format \c
335.I input-format\c
336\&\c
346535cc
DM
337\& has the same effect, as does the script command
338.BR TARGET .
0e166a63
RP
339
340You may want to use this option if you are linking files with an unusual
341binary format. You can also use \c
342.B \-b\c
343\& to switch formats explicitly (when
344linking object files of different formats), by including
345\c
346.B \-b \c
347.I input-format\c
348\&\c
349\& before each group of object files in a
350particular format.
351
352The default format is taken from the environment variable
353.B GNUTARGET\c
354\&. You can also define the input
355format from a script, using the command \c
356.B TARGET\c
357\&.
358
359.TP
360.B \-Bstatic
4551e108
ILT
361Do not link against shared libraries. This is only meaningful on
362platforms for which shared libraries are supported.
363
364.TP
365.B \-Bdynamic
366Link against dynamic libraries. This is only meaningful on platforms
367for which shared libraries are supported. This option is normally the
368default on such platforms.
369
370.TP
371.B \-Bsymbolic
372When creating a shared library, bind references to global symbols to
373the definition within the shared library, if any. Normally, it is
374possible for a program linked against a shared library to override the
375definition within the shared library. This option is only meaningful
376on ELF platforms which support shared libraries.
0e166a63
RP
377
378.TP
2a28d8b0 379.BI "\-c " "commandfile"\c
0e166a63
RP
380\&
381Directs \c
382.B ld\c
383\& to read link commands from the file
384\c
385.I commandfile\c
386\&. These commands will completely override \c
387.B ld\c
388\&'s
389default link format (rather than adding to it); \c
390.I commandfile\c
391\& must
392specify everything necessary to describe the target format.
393
394
395You may also include a script of link commands directly in the command
396line by bracketing it between `\|\c
397.B {\c
398\|' and `\|\c
399.B }\c
400\|' characters.
401
402.TP
403.B \-d
404.TP
405.B \-dc
406.TP
407.B \-dp
408These three options are equivalent; multiple forms are supported for
409compatibility with other linkers. Use any of them to make \c
410.B ld\c
411\&
412assign space to common symbols even if a relocatable output file is
413specified (\c
414.B \-r\c
415\&). The script command
416\c
417.B FORCE_COMMON_ALLOCATION\c
418\& has the same effect.
419
420.TP
421.BI "-defsym " "symbol"\c
422\& = \c
423.I expression\c
424\&
425Create a global symbol in the output file, containing the absolute
426address given by \c
427.I expression\c
428\&. You may use this option as many
429times as necessary to define multiple symbols in the command line. A
430limited form of arithmetic is supported for the \c
431.I expression\c
432\& in this
433context: you may give a hexadecimal constant or the name of an existing
434symbol, or use \c
435.B +\c
436\& and \c
437.B \-\c
438\& to add or subtract hexadecimal
439constants or symbols. If you need more elaborate expressions, consider
440using the linker command language from a script.
441
442.TP
443.BI "-e " "entry"\c
444\&
445Use \c
446.I entry\c
447\& as the explicit symbol for beginning execution of your
448program, rather than the default entry point. for a
449discussion of defaults and other ways of specifying the
450entry point.
451
39a6e282
ILT
452.TP
453.B \-embedded\-relocs
454This option is only meaningful when linking MIPS embedded PIC code,
455generated by the
456.B \-membedded\-pic
457option to the GNU compiler and assembler. It causes the linker to
458create a table which may be used at runtime to relocate any data which
459was statically initialized to pointer values. See the code in
460testsuite/ld-empic for details.
461
0e166a63
RP
462.TP
463.B \-F
464.TP
465.BI "-F" "format"\c
466\&
467Some older linkers used this option throughout a compilation toolchain
468for specifying object-file format for both input and output object
469files. \c
470.B ld\c
471\&'s mechanisms (the \c
472.B \-b\c
473\& or \c
474.B \-format\c
475\& options
476for input files, the \c
477.B TARGET\c
478\& command in linker scripts for output
479files, the \c
480.B GNUTARGET\c
481\& environment variable) are more flexible, but
482but it accepts (and ignores) the \c
483.B \-F\c
484\& option flag for compatibility
485with scripts written to call the old linker.
486
487.TP
2a28d8b0 488.BI "\-format " "input\-format"\c
0e166a63
RP
489\&
490Synonym for \c
491.B \-b\c
492\& \c
2a28d8b0 493.I input\-format\c
0e166a63
RP
494\&.
495
496.TP
497.B \-g
498Accepted, but ignored; provided for compatibility with other tools.
499
8ddef552
DM
500.TP
501.BI "\-G " "size"\c
502Set the maximum size of objects to be optimized using the GP register
503to
504.I size
505under MIPS ECOFF. Ignored for other object file formats.
506
bf065bfd
DM
507.TP
508.B \-\-help
509Print a summary of the command-line options on the standard output and exit.
510This option and
511.B \-\-version
512begin with two dashes instead of one
513for compatibility with other GNU programs. The other options start with
514only one dash for compatibility with other linkers.
515
0e166a63
RP
516.TP
517.B \-i
518Perform an incremental link (same as option \c
519.B \-r\c
520\&).
521
522.TP
2a28d8b0 523.BI "\-l" "ar"\c
0e166a63
RP
524\&
525Add an archive file \c
526.I ar\c
527\& to the list of files to link. This
528option may be used any number of times. \c
529.B ld\c
530\& will search its
531path-list for occurrences of \c
532.B lib\c
533.I ar\c
534\&.a\c
535\& for every \c
536.I ar\c
537\&
538specified.
539
540.TP
2a28d8b0 541.BI "\-L" "searchdir"\c
0e166a63
RP
542\&
543This command adds path \c
544.I searchdir\c
545\& to the list of paths that
546\c
547.B ld\c
548\& will search for archive libraries. You may use this option
549any number of times.
550
551The default set of paths searched (without being specified with
552\c
553.B \-L\c
554\&) depends on what emulation mode \c
555.B ld\c
556\& is using, and in
557some cases also on how it was configured. The
558paths can also be specified in a link script with the \c
559.B SEARCH_DIR\c
560\&
561command.
562
563.TP
564.B \-M
0e166a63
RP
565Print (to the standard output file) a link map\(em\&diagnostic information
566about where symbols are mapped by \c
567.B ld\c
568\&, and information on global
569common storage allocation.
570
d18a4527
DM
571.TP
572.BI "\-Map " "mapfile"\c
573Print to the file
574.I mapfile
575a link map\(em\&diagnostic information
576about where symbols are mapped by \c
577.B ld\c
578\&, and information on global
579common storage allocation.
580
8ddef552
DM
581.TP
582.BI "\-m " "emulation"\c
583Emulate the
584.I emulation
585linker. You can list the available emulations with the
a82ae15d 586.I \-\-verbose
1f59c7a7
ILT
587or
588.I \-V
589options. This option overrides the compiled-in default, which is the
8ddef552
DM
590system for which you configured
591.BR ld .
592
0e166a63
RP
593.TP
594.B \-N
595specifies readable and writable \c
596.B text\c
597\& and \c
598.B data\c
599\& sections. If
600the output format supports Unix style magic numbers, the output is
601marked as \c
602.B OMAGIC\c
603\&.
604
605When you use the `\|\c
606.B \-N\c
607\&\|' option, the linker does not page-align the
608data segment.
609
610.TP
611.B \-n
612sets the text segment to be read only, and \c
613.B NMAGIC\c
614\& is written
615if possible.
616
617.TP
2a28d8b0 618.B \-noinhibit\-exec
0e166a63
RP
619Normally, the linker will not produce an output file if it encounters
620errors during the link process. With this flag, you can specify that
621you wish the output file retained even after non-fatal errors.
622
e920526d
ILT
623.TP
624.B \-no\-keep\-memory
625The linker normally optimizes for speed over memory usage by caching
626the symbol tables of input files in memory. This option tells the
627linker to instead optimize for memory usage, by rereading the symbol
628tables as necessary. This may be required if the linker runs out of
629memory space while linking a large executable.
630
0e166a63 631.TP
2a28d8b0 632.BI "\-o " "output"\c
0e166a63
RP
633\&
634.I output\c
635\&
636\c
637.I output\c
638\& is a name for the program produced by \c
639.B ld\c
640\&; if this
641option is not specified, the name `\|\c
642.B a.out\c
643\|' is used by default. The
644script command \c
645.B OUTPUT\c
646\& can also specify the output file name.
647
346535cc 648.TP
2a28d8b0 649.BI "\-oformat " "output\-format"\c
346535cc
DM
650\&
651Specify the binary format for the output object file.
652You don't usually need to specify this, as
653\c
654.B ld\c
655\& is configured to produce as a default output format the most
656usual format on each machine. \c
657.I output-format\c
658\& is a text string, the
659name of a particular format supported by the BFD libraries.
660The script command
661.B OUTPUT_FORMAT
662can also specify the output format, but this option overrides it.
663
0e166a63 664.TP
2a28d8b0 665.BI "\-R " "filename"\c
0e166a63
RP
666\&
667.I file\c
668\&
669Read symbol names and their addresses from \c
670.I filename\c
671\&, but do not
672relocate it or include it in the output. This allows your output file
673to refer symbolically to absolute locations of memory defined in other
674programs.
675
676.TP
677.B \-relax
678An option with machine dependent effects. Currently this option is only
679supported on the H8/300.
680
681On some platforms, use this option to perform global optimizations that
682become possible when the linker resolves addressing in your program, such
683as relaxing address modes and synthesizing new instructions in the
684output object file.
685
686On platforms where this is not supported, `\|\c
687.B \-relax\c
688\&\|' is accepted, but has no effect.
689
690.TP
691.B \-r
692Generates relocatable output\(em\&i.e., generate an output file that can in
693turn serve as input to \c
694.B ld\c
695\&. This is often called \c
696.I partial
697linking\c
698\&. As a side effect, in environments that support standard Unix
699magic numbers, this option also sets the output file's magic number to
700\c
701.B OMAGIC\c
702\&.
703If this option is not specified, an absolute file is produced. When
704linking C++ programs, this option \c
705.I will not\c
706\& resolve references to
707constructors; \c
708.B \-Ur\c
709\& is an alternative.
710
711This option does the same as \c
712.B \-i\c
713\&.
714
715.TP
716.B \-S
717Omits debugger symbol information (but not all symbols) from the output file.
718
719.TP
720.B \-s
721Omits all symbol information from the output file.
722
4551e108
ILT
723.TP
724.B \-shared
725Create a shared library. This is currently only supported on ELF
726platforms.
727
0e166a63 728.TP
2a28d8b0
DM
729.B \-sort\-common
730Normally, when
731.B ld
732places the global common symbols in the appropriate output sections,
733it sorts them by size. First come all the one byte symbols, then all
734the two bytes, then all the four bytes, and then everything else.
da08e9b9
DM
735This is to prevent gaps between symbols due to
736alignment constraints. This option disables that sorting.
2a28d8b0 737
ec586565
ILT
738.TP
739.B \-split\-by\-reloc\ \fIcount
740Trys to creates extra sections in the output file so that no single
741output section in the file contains more than
742.I count
743relocations.
744This is useful when generating huge relocatable for downloading into
745certain real time kernels with the COFF object file format; since COFF
746cannot represent more than 65535 relocations in a single section.
747Note that this will fail to work with object file formats which do not
748support arbitrary sections. The linker will not split up individual
749input sections for redistribution, so if a single input section
750contains more than
751.I count
752relocations one output section will contain that many relocations.
753
754.TP
755.B \-split\-by\-file
756Similar to
757.B \-split\-by\-reloc
758but creates a new output section for each input file.
759
2a28d8b0
DM
760.TP
761.BI "\-Tbss " "org"\c
0e166a63 762.TP
2a28d8b0 763.BI "\-Tdata " "org"\c
0e166a63 764.TP
2a28d8b0 765.BI "\-Ttext " "org"\c
0e166a63
RP
766Use \c
767.I org\c
768\& as the starting address for\(em\&respectively\(em\&the
769\c
770.B bss\c
771\&, \c
772.B data\c
773\&, or the \c
774.B text\c
775\& segment of the output file.
776\c
777.I textorg\c
778\& must be a hexadecimal integer.
779
780.TP
2a28d8b0 781.BI "\-T " "commandfile"\c
0e166a63
RP
782\&
783.TP
2a28d8b0 784.BI "\-T" "commandfile"\c
0e166a63
RP
785Equivalent to \c
786.B \-c \c
787.I commandfile\c
788\&\c
789\&; supported for compatibility with
790other tools.
791
792.TP
793.B \-t
794Prints names of input files as \c
795.B ld\c
796\& processes them.
797
798.TP
2a28d8b0 799.BI "\-u " "sym"
0e166a63
RP
800Forces \c
801.I sym\c
802\& to be entered in the output file as an undefined symbol.
803This may, for example, trigger linking of additional modules from
804standard libraries. \c
805.B \-u\c
806\& may be repeated with different option
807arguments to enter additional undefined symbols.
808
809.TP
810.B \-Ur
811For anything other than C++ programs, this option is equivalent to
812\c
813.B \-r\c
814\&: it generates relocatable output\(em\&i.e., an output file that can in
815turn serve as input to \c
816.B ld\c
817\&. When linking C++ programs, \c
818.B \-Ur\c
819\&
820\c
821.I will\c
822\& resolve references to constructors, unlike \c
823.B \-r\c
824\&.
825
8ddef552 826.TP
a82ae15d 827.B \-\-verbose
8ddef552
DM
828Display the version number for \c
829.B ld
830and list the supported emulations.
de87cdb4 831Display which input files can and can not be opened.
8ddef552 832
0e166a63 833.TP
a82ae15d 834.B \-v, \-V
0e166a63
RP
835Display the version number for \c
836.B ld\c
837\&.
1f59c7a7
ILT
838The
839.B \-V
840option also lists the supported emulations.
0e166a63 841
bf065bfd
DM
842.TP
843.B \-\-version
844Display the version number for \c
845.B ld
846and exit.
847
2a28d8b0
DM
848.TP
849.B \-warn\-common
850Warn when a common symbol is combined with another common symbol or with
851a symbol definition. Unix linkers allow this somewhat sloppy practice,
852but linkers on some other operating systems do not. This option allows
853you to find potential problems from combining global symbols.
854
a89d9f5b
ILT
855.TP
856.B \-warn\-constructors
857Warn if any global constructors are used. This is only useful for a
858few object file formats. For formats like COFF or ELF, the linker can
859not detect the use of global constructors.
860
809ee7e0
ILT
861.TP
862.B \-warn\-once
863Only warn once for each undefined symbol, rather than once per module
864which refers to it.
865
ee499d81
ILT
866.TP
867.B \-\-whole\-archive
868For each archive mentioned on the command line, include every object
869file in the archive in the link, rather than searching the archive for
870the required object files. This is normally used to turn an archive
871file into a shared library, forcing every object to be included in the
872resulting shared library.
873
0e166a63
RP
874.TP
875.B \-X
21a2f026
ILT
876Delete all temporary local symbols. For most targets, this is all local
877symbols whose names begin with `\|\c
0e166a63
RP
878.B L\c
879\|'.
880
881.TP
882.B \-x
21a2f026 883Delete all local symbols.
0e166a63
RP
884
885.PP
886
887.SH ENVIRONMENT
888\c
8ddef552 889You can change the behavior of
0e166a63 890.B ld\c
8ddef552 891\& with the environment variable \c
0e166a63 892.B GNUTARGET\c
8ddef552 893\&.
0e166a63
RP
894
895\c
896.B GNUTARGET\c
897\& determines the input-file object format if you don't
898use \c
899.B \-b\c
900\& (or its synonym \c
901.B \-format\c
902\&). Its value should be one
903of the BFD names for an input format. If there is no
904\c
905.B GNUTARGET\c
906\& in the environment, \c
907.B ld\c
908\& uses the natural format
909of the host. If \c
910.B GNUTARGET\c
911\& is set to \c
912.B default\c
913\& then BFD attempts to discover the
914input format by examining binary input files; this method often
915succeeds, but there are potential ambiguities, since there is no method
916of ensuring that the magic number used to flag object-file formats is
917unique. However, the configuration procedure for BFD on each system
918places the conventional format for that system first in the search-list,
919so ambiguities are resolved in favor of convention.
920
0e166a63
RP
921.PP
922
923.SH "SEE ALSO"
924
925.BR objdump ( 1 )
926.br
927.br
928.RB "`\|" ld "\|' and `\|" binutils "\|'"
929entries in
930.B info\c
931.br
932.I
933ld: the GNU linker\c
934, Steve Chamberlain and Roland Pesch;
935.I
936The GNU Binary Utilities\c
937, Roland H. Pesch.
938
939.SH COPYING
940Copyright (c) 1991, 1992 Free Software Foundation, Inc.
941.PP
942Permission is granted to make and distribute verbatim copies of
943this manual provided the copyright notice and this permission notice
944are preserved on all copies.
945.PP
946Permission is granted to copy and distribute modified versions of this
947manual under the conditions for verbatim copying, provided that the
948entire resulting derived work is distributed under the terms of a
949permission notice identical to this one.
950.PP
951Permission is granted to copy and distribute translations of this
952manual into another language, under the above conditions for modified
953versions, except that this permission notice may be included in
954translations approved by the Free Software Foundation instead of in
955the original English.
This page took 0.225403 seconds and 4 git commands to generate.