d3df8f061c3edcf285b6bfee8fba01a56a0f0a46
[external/binutils.git] / ld / ld.1
1 .rn '' }`
2 ''' $RCSfile$$Revision$$Date$
3 '''
4 ''' $Log$
5 ''' Revision 1.10  2001/04/13 02:22:23  jtc
6 ''' * ld.texinfo: Document --fatal-warnings.
7 ''' * ld.1: Regenerate.
8 '''
9 ''' * ldmisc.c (vfinfo): Set flag to inhibit making executable if
10 ''' warnings have been turned into errors.
11 ''' * lexsup.c (OPTION_WARN_FATAL): Define.
12 ''' (ld_options): Entry for --fatal-warnings.
13 ''' (parse_args): Handle OPTION_WARN_FATAL.
14 ''' * ld.h (ld_config_type): Add fatal_warnings field.
15 '''
16 '''
17 .de Sh
18 .br
19 .if t .Sp
20 .ne 5
21 .PP
22 \fB\\$1\fR
23 .PP
24 ..
25 .de Sp
26 .if t .sp .5v
27 .if n .sp
28 ..
29 .de Ip
30 .br
31 .ie \\n(.$>=3 .ne \\$3
32 .el .ne 3
33 .IP "\\$1" \\$2
34 ..
35 .de Vb
36 .ft CW
37 .nf
38 .ne \\$1
39 ..
40 .de Ve
41 .ft R
42
43 .fi
44 ..
45 '''
46 '''
47 '''     Set up \*(-- to give an unbreakable dash;
48 '''     string Tr holds user defined translation string.
49 '''     Bell System Logo is used as a dummy character.
50 '''
51 .tr \(*W-|\(bv\*(Tr
52 .ie n \{\
53 .ds -- \(*W-
54 .ds PI pi
55 .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
56 .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
57 .ds L" ""
58 .ds R" ""
59 '''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
60 '''   \*(L" and \*(R", except that they are used on ".xx" lines,
61 '''   such as .IP and .SH, which do another additional levels of
62 '''   double-quote interpretation
63 .ds M" """
64 .ds S" """
65 .ds N" """""
66 .ds T" """""
67 .ds L' '
68 .ds R' '
69 .ds M' '
70 .ds S' '
71 .ds N' '
72 .ds T' '
73 'br\}
74 .el\{\
75 .ds -- \(em\|
76 .tr \*(Tr
77 .ds L" ``
78 .ds R" ''
79 .ds M" ``
80 .ds S" ''
81 .ds N" ``
82 .ds T" ''
83 .ds L' `
84 .ds R' '
85 .ds M' `
86 .ds S' '
87 .ds N' `
88 .ds T' '
89 .ds PI \(*p
90 'br\}
91 .\"     If the F register is turned on, we'll generate
92 .\"     index entries out stderr for the following things:
93 .\"             TH      Title 
94 .\"             SH      Header
95 .\"             Sh      Subsection 
96 .\"             Ip      Item
97 .\"             X<>     Xref  (embedded
98 .\"     Of course, you have to process the output yourself
99 .\"     in some meaninful fashion.
100 .if \nF \{
101 .de IX
102 .tm Index:\\$1\t\\n%\t"\\$2"
103 ..
104 .nr % 0
105 .rr F
106 .\}
107 .TH LD 1 "binutils-2.11.90" "30/Mar/2001" "GNU"
108 .UC
109 .if n .hy 0
110 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
111 .de CQ          \" put $1 in typewriter font
112 .ft CW
113 'if n "\c
114 'if t \\&\\$1\c
115 'if n \\&\\$1\c
116 'if n \&"
117 \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
118 '.ft R
119 ..
120 .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
121 .       \" AM - accent mark definitions
122 .bd B 3
123 .       \" fudge factors for nroff and troff
124 .if n \{\
125 .       ds #H 0
126 .       ds #V .8m
127 .       ds #F .3m
128 .       ds #[ \f1
129 .       ds #] \fP
130 .\}
131 .if t \{\
132 .       ds #H ((1u-(\\\\n(.fu%2u))*.13m)
133 .       ds #V .6m
134 .       ds #F 0
135 .       ds #[ \&
136 .       ds #] \&
137 .\}
138 .       \" simple accents for nroff and troff
139 .if n \{\
140 .       ds ' \&
141 .       ds ` \&
142 .       ds ^ \&
143 .       ds , \&
144 .       ds ~ ~
145 .       ds ? ?
146 .       ds ! !
147 .       ds /
148 .       ds q
149 .\}
150 .if t \{\
151 .       ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
152 .       ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
153 .       ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
154 .       ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
155 .       ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
156 .       ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
157 .       ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
158 .       ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
159 .       ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
160 .\}
161 .       \" troff and (daisy-wheel) nroff accents
162 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
163 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
164 .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
165 .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
166 .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
167 .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
168 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
169 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
170 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
171 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
172 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
173 .ds ae a\h'-(\w'a'u*4/10)'e
174 .ds Ae A\h'-(\w'A'u*4/10)'E
175 .ds oe o\h'-(\w'o'u*4/10)'e
176 .ds Oe O\h'-(\w'O'u*4/10)'E
177 .       \" corrections for vroff
178 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
179 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
180 .       \" for low resolution devices (crt and lpr)
181 .if \n(.H>23 .if \n(.V>19 \
182 \{\
183 .       ds : e
184 .       ds 8 ss
185 .       ds v \h'-1'\o'\(aa\(ga'
186 .       ds _ \h'-1'^
187 .       ds . \h'-1'.
188 .       ds 3 3
189 .       ds o a
190 .       ds d- d\h'-1'\(ga
191 .       ds D- D\h'-1'\(hy
192 .       ds th \o'bp'
193 .       ds Th \o'LP'
194 .       ds ae ae
195 .       ds Ae AE
196 .       ds oe oe
197 .       ds Oe OE
198 .\}
199 .rm #[ #] #H #V #F C
200 .SH "NAME"
201 ld \- Using LD, the GNU linker
202 .SH "SYNOPSIS"
203 ld [ options ] objfile...
204 .SH "DESCRIPTION"
205 \f(CWld\fR combines a number of object and archive files, relocates
206 their data and ties up symbol references. Usually the last step in
207 compiling a program is to run \f(CWld\fR.
208 .PP
209 \f(CWld\fR accepts Linker Command Language files written in
210 a superset of AT&T's Link Editor Command Language syntax,
211 to provide explicit and total control over the linking process.
212 .PP
213 This man page does not describe the command language; see the 
214 \f(CWld\fR entry in \f(CWinfo\fR, or the manual
215 ld: the GNU linker, for full details on the command language and 
216 on other aspects of the GNU linker. 
217 .PP
218 This version of \f(CWld\fR uses the general purpose BFD libraries
219 to operate on object files. This allows \f(CWld\fR to read, combine, and
220 write object files in many different formats---for example, COFF or
221 \f(CWa.out\fR.  Different formats may be linked together to produce any
222 available kind of object file.  
223 .PP
224 Aside from its flexibility, the GNU linker is more helpful than other
225 linkers in providing diagnostic information.  Many linkers abandon
226 execution immediately upon encountering an error; whenever possible,
227 \f(CWld\fR continues executing, allowing you to identify other errors
228 (or, in some cases, to get an output file in spite of the error).
229 .PP
230 The GNU linker \f(CWld\fR is meant to cover a broad range of situations,
231 and to be as compatible as possible with other linkers.  As a result,
232 you have many choices to control its behavior.
233 .SH "OPTIONS"
234 The linker supports a plethora of command-line options, but in actual
235 practice few of them are used in any particular context.
236 For instance, a frequent use of \f(CWld\fR is to link standard Unix
237 object files on a standard, supported Unix system.  On such a system, to
238 link a file \f(CWhello.o\fR:
239 .PP
240 .Vb 2
241 \&        
242 \&        ld -o I<output> /lib/crt0.o hello.o -lc
243 .Ve
244 This tells \f(CWld\fR to produce a file called \fIoutput\fR as the
245 result of linking the file \f(CW/lib/crt0.o\fR with \f(CWhello.o\fR and
246 the library \f(CWlibc.a\fR, which will come from the standard search
247 directories.  (See the discussion of the \fB\-l\fR option below.)
248 .PP
249 Some of the command-line options to \f(CWld\fR may be specified at any
250 point in the command line.  However, options which refer to files, such
251 as \fB\-l\fR or \fB\-T\fR, cause the file to be read at the point at
252 which the option appears in the command line, relative to the object
253 files and other file options.  Repeating non-file options with a
254 different argument will either have no further effect, or override prior
255 occurrences (those further to the left on the command line) of that
256 option.  Options which may be meaningfully specified more than once are
257 noted in the descriptions below.
258 .PP
259 Non-option arguments are object files or archives which are to be linked
260 together.  They may follow, precede, or be mixed in with command-line
261 options, except that an object file argument may not be placed between
262 an option and its argument.
263 .PP
264 Usually the linker is invoked with at least one object file, but you can
265 specify other forms of binary input files using \fB\-l\fR, \fB\-R\fR,
266 and the script command language.  If \fIno\fR binary input files at all
267 are specified, the linker does not produce any output, and issues the
268 message \fBNo input files\fR.
269 .PP
270 If the linker can not recognize the format of an object file, it will
271 assume that it is a linker script.  A script specified in this way
272 augments the main linker script used for the link (either the default
273 linker script or the one specified by using \fB\-T\fR).  This feature
274 permits the linker to link against a file which appears to be an object
275 or an archive, but actually merely defines some symbol values, or uses
276 \f(CWINPUT\fR or \f(CWGROUP\fR to load other objects.  Note that
277 specifying a script in this way should only be used to augment the main
278 linker script; if you want to use some command that logically can only
279 appear once, such as the \f(CWSECTIONS\fR or \f(CWMEMORY\fR command, you
280 must replace the default linker script using the \fB\-T\fR option.
281 .PP
282 For options whose names are a single letter,
283 option arguments must either follow the option letter without intervening
284 whitespace, or be given as separate arguments immediately following the
285 option that requires them.
286 .PP
287 For options whose names are multiple letters, either one dash or two can
288 precede the option name; for example, \fB\-trace-symbol\fR and
289 \fB--trace-symbol\fR are equivalent.  Note \- there is one exception to
290 this rule.  Multiple letter options that start with a lower case \*(L'o\*(R' can
291 only be preceeded by two dashes.  This is to reduce confusion with the
292 \fB\-o\fR option.  So for example \fB\-omagic\fR sets the output file
293 name to \fBmagic\fR whereas \fB--omagic\fR sets the NMAGIC flag on the
294 output.
295 .PP
296 Arguments to multiple-letter options must either be separated from the
297 option name by an equals sign, or be given as separate arguments
298 immediately following the option that requires them.  For example,
299 \fB--trace-symbol foo\fR and \fB--trace-symbol=foo\fR are equivalent.
300 Unique abbreviations of the names of multiple-letter options are
301 accepted.
302 .PP
303 Note \- if the linker is being invoked indirectly, via a compiler driver
304 (eg \fBgcc\fR) then all the linker command line options should be
305 prefixed by \fB\-Wl,\fR (or whatever is appropriate for the particular
306 compiler driver) like this:
307 .PP
308 .Vb 2
309 \&        
310 \&          gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
311 .Ve
312 This is important, because otherwise the compiler driver program may
313 silently drop the linker options, resulting in a bad link.
314 .PP
315 Here is a table of the generic command line switches accepted by the GNU
316 linker:
317 .Ip "\f(CW-a\fIkeyword\fR\fR" 4
318 This option is supported for \s-1HP/UX\s0 compatibility.  The \fIkeyword\fR
319 argument must be one of the strings \fBarchive\fR, \fBshared\fR, or
320 \fBdefault\fR.  \fB\-aarchive\fR is functionally equivalent to
321 \fB\-Bstatic\fR, and the other two keywords are functionally equivalent
322 to \fB\-Bdynamic\fR.  This option may be used any number of times.
323 .Ip "\f(CW-A\fIarchitecture\fR\fR" 4
324 .Ip "\f(CW--architecture=\fIarchitecture\fR\fR" 4
325 In the current release of \f(CWld\fR, this option is useful only for the
326 Intel 960 family of architectures.  In that \f(CWld\fR configuration, the
327 \fIarchitecture\fR argument identifies the particular architecture in
328 the 960 family, enabling some safeguards and modifying the
329 archive-library search path.  
330 .Sp
331 Future releases of \f(CWld\fR may support similar functionality for
332 other architecture families.
333 .Ip "\f(CW-b \fIinput-format\fR\fR" 4
334 .Ip "\f(CW--format=\fIinput-format\fR\fR" 4
335 \f(CWld\fR may be configured to support more than one kind of object
336 file.  If your \f(CWld\fR is configured this way, you can use the
337 \fB\-b\fR option to specify the binary format for input object files
338 that follow this option on the command line.  Even when \f(CWld\fR is
339 configured to support alternative object formats, you don't usually need
340 to specify this, as \f(CWld\fR should be configured to expect as a
341 default input format the most usual format on each machine.
342 \fIinput-format\fR is a text string, the name of a particular format
343 supported by the \s-1BFD\s0 libraries.  (You can list the available binary
344 formats with \fBobjdump \-i\fR.)
345 .Sp
346 You may want to use this option if you are linking files with an unusual
347 binary format.  You can also use \fB\-b\fR to switch formats explicitly (when
348 linking object files of different formats), by including
349 \fB\-b\fR \fIinput-format\fR before each group of object files in a
350 particular format.
351 .Sp
352 The default format is taken from the environment variable
353 \f(CWGNUTARGET\fR.
354 .Sp
355 You can also define the input format from a script, using the command
356 \f(CWTARGET\fR;
357 .Ip "\f(CW-c \fIMRI-commandfile\fR\fR" 4
358 .Ip "\f(CW--mri-script=\fIMRI-commandfile\fR\fR" 4
359 For compatibility with linkers produced by \s-1MRI\s0, \f(CWld\fR accepts script
360 files written in an alternate, restricted command language, described in
361 the \s-1MRI\s0 Compatible Script Files section of \s-1GNU\s0 ld documentation.
362 Introduce \s-1MRI\s0 script files with
363 the option \fB\-c\fR; use the \fB\-T\fR option to run linker
364 scripts written in the general-purpose \f(CWld\fR scripting language.
365 If \fI\s-1MRI\s0\-cmdfile\fR does not exist, \f(CWld\fR looks for it in the directories
366 specified by any \fB\-L\fR options.
367 .Ip "\f(CW-d\fR" 4
368 .Ip "\f(CW-dc\fR" 4
369 .Ip "\f(CW-dp\fR" 4
370 These three options are equivalent; multiple forms are supported for
371 compatibility with other linkers.  They assign space to common symbols
372 even if a relocatable output file is specified (with \fB\-r\fR).  The
373 script command \f(CWFORCE_COMMON_ALLOCATION\fR has the same effect.
374 .Ip "\f(CW-e \fIentry\fR\fR" 4
375 .Ip "\f(CW--entry=\fIentry\fR\fR" 4
376 Use \fIentry\fR as the explicit symbol for beginning execution of your
377 program, rather than the default entry point.  If there is no symbol
378 named \fIentry\fR, the linker will try to parse \fIentry\fR as a number,
379 and use that as the entry address (the number will be interpreted in
380 base 10; you may use a leading \fB0x\fR for base 16, or a leading
381 \fB0\fR for base 8).  
382 .Ip "\f(CW-E\fR" 4
383 .Ip "\f(CW--export-dynamic\fR" 4
384 When creating a dynamically linked executable, add all symbols to the
385 dynamic symbol table.  The dynamic symbol table is the set of symbols
386 which are visible from dynamic objects at run time.
387 .Sp
388 If you do not use this option, the dynamic symbol table will normally
389 contain only those symbols which are referenced by some dynamic object
390 mentioned in the link.
391 .Sp
392 If you use \f(CWdlopen\fR to load a dynamic object which needs to refer
393 back to the symbols defined by the program, rather than some other
394 dynamic object, then you will probably need to use this option when
395 linking the program itself.
396 .Ip "\f(CW-EB\fR" 4
397 Link big-endian objects.  This affects the default output format.
398 .Ip "\f(CW-EL\fR" 4
399 Link little-endian objects.  This affects the default output format.
400 .Ip "\f(CW-f\fR" 4
401 .Ip "\f(CW--auxiliary \fIname\fR\fR" 4
402 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_AUXILIARY\s0 field
403 to the specified name.  This tells the dynamic linker that the symbol
404 table of the shared object should be used as an auxiliary filter on the
405 symbol table of the shared object \fIname\fR.
406 .Sp
407 If you later link a program against this filter object, then, when you
408 run the program, the dynamic linker will see the \s-1DT_AUXILIARY\s0 field.  If
409 the dynamic linker resolves any symbols from the filter object, it will
410 first check whether there is a definition in the shared object
411 \fIname\fR.  If there is one, it will be used instead of the definition
412 in the filter object.  The shared object \fIname\fR need not exist.
413 Thus the shared object \fIname\fR may be used to provide an alternative
414 implementation of certain functions, perhaps for debugging or for
415 machine specific performance.
416 .Sp
417 This option may be specified more than once.  The \s-1DT_AUXILIARY\s0 entries
418 will be created in the order in which they appear on the command line.
419 .Ip "\f(CW-F \fIname\fR\fR" 4
420 .Ip "\f(CW--filter \fIname\fR\fR" 4
421 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_FILTER\s0 field to
422 the specified name.  This tells the dynamic linker that the symbol table
423 of the shared object which is being created should be used as a filter
424 on the symbol table of the shared object \fIname\fR.
425 .Sp
426 If you later link a program against this filter object, then, when you
427 run the program, the dynamic linker will see the \s-1DT_FILTER\s0 field.  The
428 dynamic linker will resolve symbols according to the symbol table of the
429 filter object as usual, but it will actually link to the definitions
430 found in the shared object \fIname\fR.  Thus the filter object can be
431 used to select a subset of the symbols provided by the object
432 \fIname\fR.
433 .Sp
434 Some older linkers used the \f(CW-F\fR option throughout a compilation
435 toolchain for specifying object-file format for both input and output
436 object files.  The \s-1GNU\s0 linker uses other mechanisms for this
437 purpose: the \f(CW-b\fR, \f(CW--format\fR, \f(CW--oformat\fR options, the
438 \f(CWTARGET\fR command in linker scripts, and the \f(CWGNUTARGET\fR
439 environment variable.  The \s-1GNU\s0 linker will ignore the \f(CW-F\fR
440 option when not creating an \s-1ELF\s0 shared object.
441 .Ip "\f(CW-fini \fIname\fR\fR" 4
442 When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
443 executable or shared object is unloaded, by setting \s-1DT_FINI\s0 to the
444 address of the function.  By default, the linker uses \f(CW_fini\fR as
445 the function to call.
446 .Ip "\f(CW-g\fR" 4
447 Ignored.  Provided for compatibility with other tools.
448 .Ip "\f(CW-G\fIvalue\fR\fR" 4
449 .Ip "\f(CW--gpsize=\fIvalue\fR\fR" 4
450 Set the maximum size of objects to be optimized using the \s-1GP\s0 register to
451 \fIsize\fR.  This is only meaningful for object file formats such as
452 \s-1MIPS\s0 \s-1ECOFF\s0 which supports putting large and small objects into different
453 sections.  This is ignored for other object file formats.
454 .Ip "\f(CW-h\fIname\fR\fR" 4
455 .Ip "\f(CW-soname=\fIname\fR\fR" 4
456 When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_SONAME\s0 field to
457 the specified name.  When an executable is linked with a shared object
458 which has a \s-1DT_SONAME\s0 field, then when the executable is run the dynamic
459 linker will attempt to load the shared object specified by the \s-1DT_SONAME\s0
460 field rather than the using the file name given to the linker.
461 .Ip "\f(CW-i\fR" 4
462 Perform an incremental link (same as option \fB\-r\fR).
463 .Ip "\f(CW-init \fIname\fR\fR" 4
464 When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
465 executable or shared object is loaded, by setting \s-1DT_INIT\s0 to the address
466 of the function.  By default, the linker uses \f(CW_init\fR as the
467 function to call.
468 .Ip "\f(CW-l\fIarchive\fR\fR" 4
469 .Ip "\f(CW--library=\fIarchive\fR\fR" 4
470 Add archive file \fIarchive\fR to the list of files to link.  This
471 option may be used any number of times.  \f(CWld\fR will search its
472 path-list for occurrences of \f(CWlib\fIarchive\fR.a\fR for every
473 \fIarchive\fR specified.
474 .Sp
475 On systems which support shared libraries, \f(CWld\fR may also search for
476 libraries with extensions other than \f(CW.a\fR.  Specifically, on \s-1ELF\s0
477 and SunOS systems, \f(CWld\fR will search a directory for a library with
478 an extension of \f(CW.so\fR before searching for one with an extension of
479 \&\f(CW.a\fR.  By convention, a \f(CW.so\fR extension indicates a shared
480 library.
481 .Sp
482 The linker will search an archive only once, at the location where it is
483 specified on the command line.  If the archive defines a symbol which
484 was undefined in some object which appeared before the archive on the
485 command line, the linker will include the appropriate \fIfile\fR\|(s) from the
486 archive.  However, an undefined symbol in an object appearing later on
487 the command line will not cause the linker to search the archive again.
488 .Sp
489 See the \f(CW-(\fR option for a way to force the linker to search
490 archives multiple times.
491 .Sp
492 You may list the same archive multiple times on the command line.
493 .Sp
494 This type of archive searching is standard for Unix linkers.  However,
495 if you are using \f(CWld\fR on \s-1AIX\s0, note that it is different from the
496 behaviour of the \s-1AIX\s0 linker.
497 .Ip "\f(CW-L\fIsearchdir\fR\fR" 4
498 .Ip "\f(CW--library-path=\fIsearchdir\fR\fR" 4
499 Add path \fIsearchdir\fR to the list of paths that \f(CWld\fR will search
500 for archive libraries and \f(CWld\fR control scripts.  You may use this
501 option any number of times.  The directories are searched in the order
502 in which they are specified on the command line.  Directories specified
503 on the command line are searched before the default directories.  All
504 \f(CW-L\fR options apply to all \f(CW-l\fR options, regardless of the
505 order in which the options appear.
506 .Sp
507 The default set of paths searched (without being specified with
508 \fB\-L\fR) depends on which emulation mode \f(CWld\fR is using, and in
509 some cases also on how it was configured.  
510 .Sp
511 The paths can also be specified in a link script with the
512 \f(CWSEARCH_DIR\fR command.  Directories specified this way are searched
513 at the point in which the linker script appears in the command line.
514 .Ip "\f(CW-m\fIemulation\fR\fR" 4
515 Emulate the \fIemulation\fR linker.  You can list the available
516 emulations with the \fB--verbose\fR or \fB\-V\fR options.
517 .Sp
518 If the \fB\-m\fR option is not used, the emulation is taken from the
519 \f(CWLDEMULATION\fR environment variable, if that is defined.
520 .Sp
521 Otherwise, the default emulation depends upon how the linker was
522 configured.
523 .Ip "\f(CW-M\fR" 4
524 .Ip "\f(CW--print-map\fR" 4
525 Print a link map to the standard output.  A link map provides
526 information about the link, including the following:
527 .Ip "\(bu" 8
528 Where object files and symbols are mapped into memory.
529 .Ip "\(bu" 8
530 How common symbols are allocated.
531 .Ip "\(bu" 8
532 All archive members included in the link, with a mention of the symbol
533 which caused the archive member to be brought in.
534 .Ip "\f(CW-n\fR" 4
535 .Ip "\f(CW--nmagic\fR" 4
536 Turn off page alignment of sections, and mark the output as
537 \f(CWNMAGIC\fR if possible.
538 .Ip "\f(CW-N\fR" 4
539 .Ip "\f(CW--omagic\fR" 4
540 Set the text and data sections to be readable and writable.  Also, do
541 not page-align the data segment.  If the output format supports Unix
542 style magic numbers, mark the output as \f(CWOMAGIC\fR.
543 .Ip "\f(CW-o \fIoutput\fR\fR" 4
544 .Ip "\f(CW--output=\fIoutput\fR\fR" 4
545 Use \fIoutput\fR as the name for the program produced by \f(CWld\fR; if this
546 option is not specified, the name \fIa.out\fR is used by default.  The
547 script command \f(CWOUTPUT\fR can also specify the output file name.
548 .Ip "\f(CW-O \fIlevel\fR\fR" 4
549 If \fIlevel\fR is a numeric values greater than zero \f(CWld\fR optimizes
550 the output.  This might take significantly longer and therefore probably
551 should only be enabled for the final binary.
552 .Ip "\f(CW-q\fR" 4
553 .Ip "\f(CW--emit-relocs\fR" 4
554 Leave relocation sections and contents in fully linked exececutables.
555 Post link analysis and optimization tools may need this information in
556 order to perform correct modifications of executables.  This results
557 in larger executables.
558 .Ip "\f(CW-r\fR" 4
559 .Ip "\f(CW--relocateable\fR" 4
560 Generate relocatable output---i.e., generate an output file that can in
561 turn serve as input to \f(CWld\fR.  This is often called \fIpartial
562 linking\fR.  As a side effect, in environments that support standard Unix
563 magic numbers, this option also sets the output file's magic number to
564 \f(CWOMAGIC\fR.
565 If this option is not specified, an absolute file is produced.  When
566 linking \*(C+ programs, this option \fIwill not\fR resolve references to
567 constructors; to do that, use \fB\-Ur\fR.
568 .Sp
569 This option does the same thing as \fB\-i\fR.
570 .Ip "\f(CW-R \fIfilename\fR\fR" 4
571 .Ip "\f(CW--just-symbols=\fIfilename\fR\fR" 4
572 Read symbol names and their addresses from \fIfilename\fR, but do not
573 relocate it or include it in the output.  This allows your output file
574 to refer symbolically to absolute locations of memory defined in other
575 programs.  You may use this option more than once.
576 .Sp
577 For compatibility with other \s-1ELF\s0 linkers, if the \f(CW-R\fR option is
578 followed by a directory name, rather than a file name, it is treated as
579 the \f(CW-rpath\fR option.
580 .Ip "\f(CW-s\fR" 4
581 .Ip "\f(CW--strip-all\fR" 4
582 Omit all symbol information from the output file.
583 .Ip "\f(CW-S\fR" 4
584 .Ip "\f(CW--strip-debug\fR" 4
585 Omit debugger symbol information (but not all symbols) from the output file.
586 .Ip "\f(CW-t\fR" 4
587 .Ip "\f(CW--trace\fR" 4
588 Print the names of the input files as \f(CWld\fR processes them.
589 .Ip "\f(CW-T \fIscriptfile\fR\fR" 4
590 .Ip "\f(CW--script=\fIscriptfile\fR\fR" 4
591 Use \fIscriptfile\fR as the linker script.  This script replaces
592 \f(CWld\fR's default linker script (rather than adding to it), so
593 \fIcommandfile\fR must specify everything necessary to describe the
594 output file.  You must use this option if you want to use a command
595 which can only appear once in a linker script, such as the
596 \f(CWSECTIONS\fR or \f(CWMEMORY\fR command.    If
597 \fIscriptfile\fR does not exist in the current directory, \f(CWld\fR
598 looks for it in the directories specified by any preceding \fB\-L\fR
599 options.  Multiple \fB\-T\fR options accumulate.
600 .Ip "\f(CW-u \fIsymbol\fR\fR" 4
601 .Ip "\f(CW--undefined=\fIsymbol\fR\fR" 4
602 Force \fIsymbol\fR to be entered in the output file as an undefined
603 symbol.  Doing this may, for example, trigger linking of additional
604 modules from standard libraries.  \fB\-u\fR may be repeated with
605 different option arguments to enter additional undefined symbols.  This
606 option is equivalent to the \f(CWEXTERN\fR linker script command.
607 .Ip "\f(CW-Ur\fR" 4
608 For anything other than \*(C+ programs, this option is equivalent to
609 \fB\-r\fR: it generates relocatable output---i.e., an output file that can in
610 turn serve as input to \f(CWld\fR.  When linking \*(C+ programs, \fB\-Ur\fR
611 \fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.
612 It does not work to use \fB\-Ur\fR on files that were themselves linked
613 with \fB\-Ur\fR; once the constructor table has been built, it cannot
614 be added to.  Use \fB\-Ur\fR only for the last partial link, and
615 \fB\-r\fR for the others.
616 .Ip "\f(CW--unique[=\fISECTION\fR]\fR" 4
617 Creates a separate output section for every input section matching
618 \fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument is
619 missing, for every orphan input section.  An orphan section is one not
620 specifically mentioned in a linker script.  You may use this option
621 multiple times on the command line;  It prevents the normal merging of
622 input sections with the same name, overriding output section assignments
623 in a linker script.
624 .Ip "\f(CW-v\fR" 4
625 .Ip "\f(CW--version\fR" 4
626 .Ip "\f(CW-V\fR" 4
627 Display the version number for \f(CWld\fR.  The \f(CW-V\fR option also
628 lists the supported emulations.
629 .Ip "\f(CW-x\fR" 4
630 .Ip "\f(CW--discard-all\fR" 4
631 Delete all local symbols.
632 .Ip "\f(CW-X\fR" 4
633 .Ip "\f(CW--discard-locals\fR" 4
634 Delete all temporary local symbols.  For most targets, this is all local
635 symbols whose names begin with \fBL\fR.
636 .Ip "\f(CW-y \fIsymbol\fR\fR" 4
637 .Ip "\f(CW--trace-symbol=\fIsymbol\fR\fR" 4
638 Print the name of each linked file in which \fIsymbol\fR appears.  This
639 option may be given any number of times.  On many systems it is necessary
640 to prepend an underscore.
641 .Sp
642 This option is useful when you have an undefined symbol in your link but
643 don't know where the reference is coming from.
644 .Ip "\f(CW-Y \fIpath\fR\fR" 4
645 Add \fIpath\fR to the default library search path.  This option exists
646 for Solaris compatibility.
647 .Ip "\f(CW-z \fIkeyword\fR\fR" 4
648 The recognized keywords are \f(CWinitfirst\fR, \f(CWinterpose\fR,
649 \f(CWloadfltr\fR, \f(CWnodefaultlib\fR, \f(CWnodelete\fR, \f(CWnodlopen\fR,
650 \f(CWnodump\fR, \f(CWnow\fR and \f(CWorigin\fR. The other keywords are
651 ignored for Solaris compatibility. \f(CWinitfirst\fR marks the object
652 to be initialized first at runtime before any other objects.
653 \f(CWinterpose\fR marks the object that its symbol table interposes
654 before all symbols but the primary executable. \f(CWloadfltr\fR marks
655 the object that its filtees be processed immediately at runtime.
656 \f(CWnodefaultlib\fR marks the object that the search for dependencies
657 of this object will ignore any default library search paths.
658 \f(CWnodelete\fR marks the object shouldn't be unloaded at runtime.
659 \f(CWnodlopen\fR marks the object not available to \f(CWdlopen\fR.
660 \f(CWnodump\fR marks the object can not be dumped by \f(CWdldump\fR.
661 \f(CWnow\fR marks the object with the non-lazy runtime binding.
662 \f(CWorigin\fR marks the object may contain \f(CW$ORIGIN\fR.
663 \f(CWdefs\fR disallows undefined symbols.
664 .Ip "\f(CW-( \fIarchives\fR -)\fR" 4
665 .Ip "\f(CW--start-group \fIarchives\fR --end-group\fR" 4
666 The \fIarchives\fR should be a list of archive files.  They may be
667 either explicit file names, or \fB\-l\fR options.
668 .Sp
669 The specified archives are searched repeatedly until no new undefined
670 references are created.  Normally, an archive is searched only once in
671 the order that it is specified on the command line.  If a symbol in that
672 archive is needed to resolve an undefined symbol referred to by an
673 object in an archive that appears later on the command line, the linker
674 would not be able to resolve that reference.  By grouping the archives,
675 they all be searched repeatedly until all possible references are
676 resolved.
677 .Sp
678 Using this option has a significant performance cost.  It is best to use
679 it only when there are unavoidable circular references between two or
680 more archives.
681 .Ip "\f(CW-assert \fIkeyword\fR\fR" 4
682 This option is ignored for SunOS compatibility.
683 .Ip "\f(CW-Bdynamic\fR" 4
684 .Ip "\f(CW-dy\fR" 4
685 .Ip "\f(CW-call_shared\fR" 4
686 Link against dynamic libraries.  This is only meaningful on platforms
687 for which shared libraries are supported.  This option is normally the
688 default on such platforms.  The different variants of this option are
689 for compatibility with various systems.  You may use this option
690 multiple times on the command line: it affects library searching for
691 \f(CW-l\fR options which follow it.
692 .Ip "\f(CW-Bgroup\fR" 4
693 Set the \f(CWDF_1_GROUP\fR flag in the \f(CWDT_FLAGS_1\fR entry in the dynamic
694 section.  This causes the runtime linker to handle lookups in this
695 object and its dependencies to be performed only inside the group.
696 \f(CW--no-undefined\fR is implied.  This option is only meaningful on \s-1ELF\s0
697 platforms which support shared libraries.
698 .Ip "\f(CW-Bstatic\fR" 4
699 .Ip "\f(CW-dn\fR" 4
700 .Ip "\f(CW-non_shared\fR" 4
701 .Ip "\f(CW-static\fR" 4
702 Do not link against shared libraries.  This is only meaningful on
703 platforms for which shared libraries are supported.  The different
704 variants of this option are for compatibility with various systems.  You
705 may use this option multiple times on the command line: it affects
706 library searching for \f(CW-l\fR options which follow it.
707 .Ip "\f(CW-Bsymbolic\fR" 4
708 When creating a shared library, bind references to global symbols to the
709 definition within the shared library, if any.  Normally, it is possible
710 for a program linked against a shared library to override the definition
711 within the shared library.  This option is only meaningful on \s-1ELF\s0
712 platforms which support shared libraries.
713 .Ip "\f(CW--check-sections\fR" 4
714 .Ip "\f(CW--no-check-sections\fR" 4
715 Asks the linker \fInot\fR to check section addresses after they have
716 been assigned to see if there any overlaps.  Normally the linker will
717 perform this check, and if it finds any overlaps it will produce
718 suitable error messages.  The linker does know about, and does make
719 allowances for sections in overlays.  The default behaviour can be
720 restored by using the command line switch \fB--check-sections\fR.
721 .Ip "\f(CW--cref\fR" 4
722 Output a cross reference table.  If a linker map file is being
723 generated, the cross reference table is printed to the map file.
724 Otherwise, it is printed on the standard output.
725 .Sp
726 The format of the table is intentionally simple, so that it may be
727 easily processed by a script if necessary.  The symbols are printed out,
728 sorted by name.  For each symbol, a list of file names is given.  If the
729 symbol is defined, the first file listed is the location of the
730 definition.  The remaining files contain references to the symbol.
731 .Ip "\f(CW--defsym \fIsymbol\fR=\fIexpression\fR\fR" 4
732 Create a global symbol in the output file, containing the absolute
733 address given by \fIexpression\fR.  You may use this option as many
734 times as necessary to define multiple symbols in the command line.  A
735 limited form of arithmetic is supported for the \fIexpression\fR in this
736 context: you may give a hexadecimal constant or the name of an existing
737 symbol, or use \f(CW+\fR and \f(CW-\fR to add or subtract hexadecimal
738 constants or symbols.  If you need more elaborate expressions, consider
739 using the linker command language from a script.  \fINote:\fR there should be no white
740 space between \fIsymbol\fR, the equals sign (``\fB=\fR''), and
741 \fIexpression\fR.
742 .Ip "\f(CW--demangle[=\fIstyle\fR]\fR" 4
743 .Ip "\f(CW--no-demangle\fR" 4
744 These options control whether to demangle symbol names in error messages
745 and other output.  When the linker is told to demangle, it tries to
746 present symbol names in a readable fashion: it strips leading
747 underscores if they are used by the object file format, and converts \*(C+
748 mangled symbol names into user readable names.  Different compilers have
749 different mangling styles.  The optional demangling style argument can be used
750 to choose an appropriate demangling style for your compiler.  The linker will
751 demangle by default unless the environment variable \fB\s-1COLLECT_NO_DEMANGLE\s0\fR
752 is set.  These options may be used to override the default.
753 .Ip "\f(CW--dynamic-linker \fIfile\fR\fR" 4
754 Set the name of the dynamic linker.  This is only meaningful when
755 generating dynamically linked \s-1ELF\s0 executables.  The default dynamic
756 linker is normally correct; don't use this unless you know what you are
757 doing.
758 .Ip "\f(CW--embedded-relocs\fR" 4
759 This option is only meaningful when linking \s-1MIPS\s0 embedded \s-1PIC\s0 code,
760 generated by the \-membedded-pic option to the \s-1GNU\s0 compiler and
761 assembler.  It causes the linker to create a table which may be used at
762 runtime to relocate any data which was statically initialized to pointer
763 values.  See the code in testsuite/ld-empic for details.
764 .Ip "\f(CW--fatal-warnings\fR" 4
765 Treat all warnings as errors.
766 .Ip "\f(CW--force-exe-suffix\fR" 4
767 Make sure that an output file has a .exe suffix.
768 .Sp
769 If a successfully built fully linked output file does not have a
770 \&\f(CW.exe\fR or \f(CW.dll\fR suffix, this option forces the linker to copy
771 the output file to one of the same name with a \f(CW.exe\fR suffix. This
772 option is useful when using unmodified Unix makefiles on a Microsoft
773 Windows host, since some versions of Windows won't run an image unless
774 it ends in a \f(CW.exe\fR suffix.
775 .Ip "\f(CW--no-gc-sections\fR" 4
776 .Ip "\f(CW--gc-sections\fR" 4
777 Enable garbage collection of unused input sections.  It is ignored on
778 targets that do not support this option.  This option is not compatible
779 with \fB\-r\fR, nor should it be used with dynamic linking.  The default
780 behaviour (of not performing this garbage collection) can be restored by
781 specifying \fB--no-gc-sections\fR on the command line.
782 .Ip "\f(CW--help\fR" 4
783 Print a summary of the command-line options on the standard output and exit.
784 .Ip "\f(CW--target-help\fR" 4
785 Print a summary of all target specific options on the standard output and exit.
786 .Ip "\f(CW-Map \fImapfile\fR\fR" 4
787 Print a link map to the file \fImapfile\fR.  See the description of the
788 \fB\-M\fR option, above.
789 .Ip "\f(CW--no-keep-memory\fR" 4
790 \f(CWld\fR normally optimizes for speed over memory usage by caching the
791 symbol tables of input files in memory.  This option tells \f(CWld\fR to
792 instead optimize for memory usage, by rereading the symbol tables as
793 necessary.  This may be required if \f(CWld\fR runs out of memory space
794 while linking a large executable.
795 .Ip "\f(CW--no-undefined\fR" 4
796 .Ip "\f(CW-z defs\fR" 4
797 Normally when creating a non-symbolic shared library, undefined symbols
798 are allowed and left to be resolved by the runtime loader.  These options
799 disallows such undefined symbols.
800 .Ip "\f(CW--allow-shlib-undefined\fR" 4
801 Allow undefined symbols in shared objects even  when --no-undefined is
802 set. The net result will be that undefined symbols in regular objects
803 will still trigger an error, but undefined symbols in shared objects
804 will be ignored.  The implementation of no_undefined makes the
805 assumption that the runtime linker will choke on undefined symbols.
806 However there is at least one system (BeOS) where undefined symbols in
807 shared libraries is normal since the kernel patches them at load time to
808 select which function is most appropriate for the current architecture.
809 I.E. dynamically select an appropriate memset function.  Apparently it
810 is also normal for \s-1HPPA\s0 shared libraries to have undefined symbols.
811 .Ip "\f(CW--no-warn-mismatch\fR" 4
812 Normally \f(CWld\fR will give an error if you try to link together input
813 files that are mismatched for some reason, perhaps because they have
814 been compiled for different processors or for different endiannesses.
815 This option tells \f(CWld\fR that it should silently permit such possible
816 errors.  This option should only be used with care, in cases when you
817 have taken some special action that ensures that the linker errors are
818 inappropriate.
819 .Ip "\f(CW--no-whole-archive\fR" 4
820 Turn off the effect of the \f(CW--whole-archive\fR option for subsequent
821 archive files.
822 .Ip "\f(CW--noinhibit-exec\fR" 4
823 Retain the executable output file whenever it is still usable.
824 Normally, the linker will not produce an output file if it encounters
825 errors during the link process; it exits without writing an output file
826 when it issues any error whatsoever.
827 .Ip "\f(CW--oformat \fIoutput-format\fR\fR" 4
828 \f(CWld\fR may be configured to support more than one kind of object
829 file.  If your \f(CWld\fR is configured this way, you can use the
830 \fB--oformat\fR option to specify the binary format for the output
831 object file.  Even when \f(CWld\fR is configured to support alternative
832 object formats, you don't usually need to specify this, as \f(CWld\fR
833 should be configured to produce as a default output format the most
834 usual format on each machine.  \fIoutput-format\fR is a text string, the
835 name of a particular format supported by the \s-1BFD\s0 libraries.  (You can
836 list the available binary formats with \fBobjdump \-i\fR.)  The script
837 command \f(CWOUTPUT_FORMAT\fR can also specify the output format, but
838 this option overrides it.  
839 .Ip "\f(CW-qmagic\fR" 4
840 This option is ignored for Linux compatibility.
841 .Ip "\f(CW-Qy\fR" 4
842 This option is ignored for \s-1SVR4\s0 compatibility.
843 .Ip "\f(CW--relax\fR" 4
844 An option with machine dependent effects.
845 This option is only supported on a few targets.
846 .Sp
847 On some platforms, the \fB--relax\fR option performs global
848 optimizations that become possible when the linker resolves addressing
849 in the program, such as relaxing address modes and synthesizing new
850 instructions in the output object file.
851 .Sp
852 On some platforms these link time global optimizations may make symbolic
853 debugging of the resulting executable impossible.
854 This is known to be
855 the case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors.
856 .Sp
857 On platforms where this is not supported, \fB--relax\fR is accepted,
858 but ignored.
859 .Ip "\f(CW--retain-symbols-file \fIfilename\fR\fR" 4
860 Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,
861 discarding all others.  \fIfilename\fR is simply a flat file, with one
862 symbol name per line.  This option is especially useful in environments
863 (such as VxWorks)
864 where a large global symbol table is accumulated gradually, to conserve
865 run-time memory.
866 .Sp
867 \fB--retain-symbols-file\fR does \fInot\fR discard undefined symbols,
868 or symbols needed for relocations.
869 .Sp
870 You may only specify \fB--retain-symbols-file\fR once in the command
871 line.  It overrides \fB\-s\fR and \fB\-S\fR.
872 .Ip "\f(CW-rpath \fIdir\fR\fR" 4
873 Add a directory to the runtime library search path.  This is used when
874 linking an \s-1ELF\s0 executable with shared objects.  All \f(CW-rpath\fR
875 arguments are concatenated and passed to the runtime linker, which uses
876 them to locate shared objects at runtime.  The \f(CW-rpath\fR option is
877 also used when locating shared objects which are needed by shared
878 objects explicitly included in the link; see the description of the
879 \f(CW-rpath-link\fR option.  If \f(CW-rpath\fR is not used when linking an
880 \s-1ELF\s0 executable, the contents of the environment variable
881 \f(CWLD_RUN_PATH\fR will be used if it is defined.
882 .Sp
883 The \f(CW-rpath\fR option may also be used on SunOS.  By default, on
884 SunOS, the linker will form a runtime search patch out of all the
885 \f(CW-L\fR options it is given.  If a \f(CW-rpath\fR option is used, the
886 runtime search path will be formed exclusively using the \f(CW-rpath\fR
887 options, ignoring the \f(CW-L\fR options.  This can be useful when using
888 gcc, which adds many \f(CW-L\fR options which may be on \s-1NFS\s0 mounted
889 filesystems.
890 .Sp
891 For compatibility with other \s-1ELF\s0 linkers, if the \f(CW-R\fR option is
892 followed by a directory name, rather than a file name, it is treated as
893 the \f(CW-rpath\fR option.
894 .Ip "\f(CW-rpath-link \fIDIR\fR\fR" 4
895 When using \s-1ELF\s0 or SunOS, one shared library may require another.  This
896 happens when an \f(CWld -shared\fR link includes a shared library as one
897 of the input files.
898 .Sp
899 When the linker encounters such a dependency when doing a non-shared,
900 non-relocatable link, it will automatically try to locate the required
901 shared library and include it in the link, if it is not included
902 explicitly.  In such a case, the \f(CW-rpath-link\fR option
903 specifies the first set of directories to search.  The
904 \f(CW-rpath-link\fR option may specify a sequence of directory names
905 either by specifying a list of names separated by colons, or by
906 appearing multiple times.
907 .Sp
908 This option should be used with caution as it overrides the search path
909 that may have been hard compiled into a shared library. In such a case it
910 is possible to use unintentionally a different search path than the
911 runtime linker would do.
912 .Sp
913 The linker uses the following search paths to locate required shared
914 libraries.
915 .Ip "1." 8
916 Any directories specified by \f(CW-rpath-link\fR options.
917 .Ip "2." 8
918 Any directories specified by \f(CW-rpath\fR options.  The difference
919 between \f(CW-rpath\fR and \f(CW-rpath-link\fR is that directories
920 specified by \f(CW-rpath\fR options are included in the executable and
921 used at runtime, whereas the \f(CW-rpath-link\fR option is only effective
922 at link time. It is for the native linker only.
923 .Ip "3." 8
924 On an \s-1ELF\s0 system, if the \f(CW-rpath\fR and \f(CWrpath-link\fR options
925 were not used, search the contents of the environment variable
926 \f(CWLD_RUN_PATH\fR. It is for the native linker only.
927 .Ip "4." 8
928 On SunOS, if the \f(CW-rpath\fR option was not used, search any
929 directories specified using \f(CW-L\fR options.
930 .Ip "5." 8
931 For a native linker, the contents of the environment variable
932 \f(CWLD_LIBRARY_PATH\fR.
933 .Ip "6." 8
934 For a native \s-1ELF\s0 linker, the directories in \f(CWDT_RUNPATH\fR or
935 \f(CWDT_RPATH\fR of a shared library are searched for shared
936 libraries needed by it. The \f(CWDT_RPATH\fR entries are ignored if
937 \f(CWDT_RUNPATH\fR entries exist.
938 .Ip "7." 8
939 The default directories, normally \fI/lib\fR and \fI/usr/lib\fR.
940 .Ip "8." 8
941 For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fR
942 exists, the list of directories found in that file.
943 .Sp
944 If the required shared library is not found, the linker will issue a
945 warning and continue with the link.
946 .Ip "\f(CW-shared\fR" 4
947 .Ip "\f(CW-Bshareable\fR" 4
948 Create a shared library.  This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0
949 and SunOS platforms.  On SunOS, the linker will automatically create a
950 shared library if the \f(CW-e\fR option is not used and there are
951 undefined symbols in the link.
952 .Ip "\f(CW--sort-common\fR" 4
953 This option tells \f(CWld\fR to sort the common symbols by size when it
954 places them in the appropriate output sections.  First come all the one
955 byte symbols, then all the two bytes, then all the four bytes, and then
956 everything else.  This is to prevent gaps between symbols due to
957 alignment constraints.
958 .Ip "\f(CW--split-by-file [\fIsize\fR]\fR" 4
959 Similar to \f(CW--split-by-reloc\fR but creates a new output section for
960 each input file when \fIsize\fR is reached.  \fIsize\fR defaults to a
961 size of 1 if not given.
962 .Ip "\f(CW--split-by-reloc [\fIcount\fR]\fR" 4
963 Tries to creates extra sections in the output file so that no single
964 output section in the file contains more than \fIcount\fR relocations.
965 This is useful when generating huge relocatable files for downloading into
966 certain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0
967 cannot represent more than 65535 relocations in a single section.  Note
968 that this will fail to work with object file formats which do not
969 support arbitrary sections.  The linker will not split up individual
970 input sections for redistribution, so if a single input section contains
971 more than \fIcount\fR relocations one output section will contain that
972 many relocations.  \fIcount\fR defaults to a value of 32768.
973 .Ip "\f(CW--stats\fR" 4
974 Compute and display statistics about the operation of the linker, such
975 as execution time and memory usage.
976 .Ip "\f(CW--traditional-format\fR" 4
977 For some targets, the output of \f(CWld\fR is different in some ways from
978 the output of some existing linker.  This switch requests \f(CWld\fR to
979 use the traditional format instead.
980 .Sp
981 For example, on SunOS, \f(CWld\fR combines duplicate entries in the
982 symbol string table.  This can reduce the size of an output file with
983 full debugging information by over 30 percent.  Unfortunately, the SunOS
984 \f(CWdbx\fR program can not read the resulting program (\f(CWgdb\fR has no
985 trouble).  The \fB--traditional-format\fR switch tells \f(CWld\fR to not
986 combine duplicate entries.
987 .Ip "\f(CW--section-start \fIsectionname\fR=\fIorg\fR\fR" 4
988 Locate a section in the output file at the absolute
989 address given by \fIorg\fR.  You may use this option as many
990 times as necessary to locate multiple sections in the command
991 line.
992 \fIorg\fR must be a single hexadecimal integer;
993 for compatibility with other linkers, you may omit the leading
994 \fB0x\fR usually associated with hexadecimal values.  \fINote:\fR there
995 should be no white space between \fIsectionname\fR, the equals
996 sign (``\fB=\fR''), and \fIorg\fR.
997 .Ip "\f(CW-Tbss \fIorg\fR\fR" 4
998 .Ip "\f(CW-Tdata \fIorg\fR\fR" 4
999 .Ip "\f(CW-Ttext \fIorg\fR\fR" 4
1000 Use \fIorg\fR as the starting address for---respectively---the
1001 \f(CWbss\fR, \f(CWdata\fR, or the \f(CWtext\fR segment of the output file.
1002 \fIorg\fR must be a single hexadecimal integer;
1003 for compatibility with other linkers, you may omit the leading
1004 \fB0x\fR usually associated with hexadecimal values.
1005 .Ip "\f(CW--dll-verbose\fR" 4
1006 .Ip "\f(CW--verbose\fR" 4
1007 Display the version number for \f(CWld\fR and list the linker emulations
1008 supported.  Display which input files can and cannot be opened.  Display
1009 the linker script if using a default builtin script.
1010 .Ip "\f(CW--version-script=\fIversion-scriptfile\fR\fR" 4
1011 Specify the name of a version script to the linker.  This is typically
1012 used when creating shared libraries to specify additional information
1013 about the version heirarchy for the library being created.  This option
1014 is only meaningful on \s-1ELF\s0 platforms which support shared libraries.
1015 .Ip "\f(CW--warn-common\fR" 4
1016 Warn when a common symbol is combined with another common symbol or with
1017 a symbol definition.  Unix linkers allow this somewhat sloppy practice,
1018 but linkers on some other operating systems do not.  This option allows
1019 you to find potential problems from combining global symbols.
1020 Unfortunately, some C libraries use this practice, so you may get some
1021 warnings about symbols in the libraries as well as in your programs.
1022 .Sp
1023 There are three kinds of global symbols, illustrated here by C examples:
1024 .Ip "\fBint i = 1;\fR" 8
1025 A definition, which goes in the initialized data section of the output
1026 file.
1027 .Ip "\fBextern int i;\fR" 8
1028 An undefined reference, which does not allocate space.
1029 There must be either a definition or a common symbol for the
1030 variable somewhere.
1031 .Ip "\fBint i;\fR" 8
1032 A common symbol.  If there are only (one or more) common symbols for a
1033 variable, it goes in the uninitialized data area of the output file.
1034 The linker merges multiple common symbols for the same variable into a
1035 single symbol.  If they are of different sizes, it picks the largest
1036 size.  The linker turns a common symbol into a declaration, if there is
1037 a definition of the same variable.
1038 .Sp
1039 The \fB--warn-common\fR option can produce five kinds of warnings.
1040 Each warning consists of a pair of lines: the first describes the symbol
1041 just encountered, and the second describes the previous symbol
1042 encountered with the same name.  One or both of the two symbols will be
1043 a common symbol.
1044 .Ip "1." 8
1045 Turning a common symbol into a reference, because there is already a
1046 definition for the symbol.
1047         
1048         \fIfile\fR(\fIsection\fR): warning: common of `\fIsymbol\fR\*(R'
1049            overridden by definition
1050         \fIfile\fR(\fIsection\fR): warning: defined here
1051 .Ip "2." 8
1052 Turning a common symbol into a reference, because a later definition for
1053 the symbol is encountered.  This is the same as the previous case,
1054 except that the symbols are encountered in a different order.
1055         
1056         \fIfile\fR(\fIsection\fR): warning: definition of `\fIsymbol\fR\*(R'
1057            overriding common
1058         \fIfile\fR(\fIsection\fR): warning: common is here
1059 .Ip "3." 8
1060 Merging a common symbol with a previous same-sized common symbol.
1061         
1062         \fIfile\fR(\fIsection\fR): warning: multiple common
1063            of `\fIsymbol\fR\*(R'
1064         \fIfile\fR(\fIsection\fR): warning: previous common is here
1065 .Ip "4." 8
1066 Merging a common symbol with a previous larger common symbol.
1067         
1068         \fIfile\fR(\fIsection\fR): warning: common of `\fIsymbol\fR\*(R'
1069            overridden by larger common
1070         \fIfile\fR(\fIsection\fR): warning: larger common is here
1071 .Ip "5." 8
1072 Merging a common symbol with a previous smaller common symbol.  This is
1073 the same as the previous case, except that the symbols are
1074 encountered in a different order.
1075         
1076         \fIfile\fR(\fIsection\fR): warning: common of `\fIsymbol\fR\*(R'
1077            overriding smaller common
1078         \fIfile\fR(\fIsection\fR): warning: smaller common is here
1079 .Ip "\f(CW--warn-constructors\fR" 4
1080 Warn if any global constructors are used.  This is only useful for a few
1081 object file formats.  For formats like \s-1COFF\s0 or \s-1ELF\s0, the linker can not
1082 detect the use of global constructors.
1083 .Ip "\f(CW--warn-multiple-gp\fR" 4
1084 Warn if multiple global pointer values are required in the output file.
1085 This is only meaningful for certain processors, such as the Alpha.
1086 Specifically, some processors put large-valued constants in a special
1087 section.  A special register (the global pointer) points into the middle
1088 of this section, so that constants can be loaded efficiently via a
1089 base-register relative addressing mode.  Since the offset in
1090 base-register relative mode is fixed and relatively small (e.g., 16
1091 bits), this limits the maximum size of the constant pool.  Thus, in
1092 large programs, it is often necessary to use multiple global pointer
1093 values in order to be able to address all possible constants.  This
1094 option causes a warning to be issued whenever this case occurs.
1095 .Ip "\f(CW--warn-once\fR" 4
1096 Only warn once for each undefined symbol, rather than once per module
1097 which refers to it.
1098 .Ip "\f(CW--warn-section-align\fR" 4
1099 Warn if the address of an output section is changed because of
1100 alignment.  Typically, the alignment will be set by an input section.
1101 The address will only be changed if it not explicitly specified; that
1102 is, if the \f(CWSECTIONS\fR command does not specify a start address for
1103 the section.
1104 .Ip "\f(CW--whole-archive\fR" 4
1105 For each archive mentioned on the command line after the
1106 \f(CW--whole-archive\fR option, include every object file in the archive
1107 in the link, rather than searching the archive for the required object
1108 files.  This is normally used to turn an archive file into a shared
1109 library, forcing every object to be included in the resulting shared
1110 library.  This option may be used more than once.
1111 .Sp
1112 Two notes when using this option from gcc: First, gcc doesn't know
1113 about this option, so you have to use \f(CW-Wl,-whole-archive\fR.
1114 Second, don't forget to use \f(CW-Wl,-no-whole-archive\fR after your
1115 list of archives, because gcc will add its own list of archives to
1116 your link and you may not want this flag to affect those as well.
1117 .Ip "\f(CW--wrap \fIsymbol\fR\fR" 4
1118 Use a wrapper function for \fIsymbol\fR.  Any undefined reference to
1119 \fIsymbol\fR will be resolved to \f(CW__wrap_\fIsymbol\fR\fR.  Any
1120 undefined reference to \f(CW__real_\fIsymbol\fR\fR will be resolved to
1121 \fIsymbol\fR.
1122 .Sp
1123 This can be used to provide a wrapper for a system function.  The
1124 wrapper function should be called \f(CW__wrap_\fIsymbol\fR\fR.  If it
1125 wishes to call the system function, it should call
1126 \f(CW__real_\fIsymbol\fR\fR.
1127 .Sp
1128 Here is a trivial example:
1129 .Sp
1130 .Vb 7
1131 \&        
1132 \&        void *
1133 \&        __wrap_malloc (int c)
1134 \&        {
1135 \&          printf ("malloc called with %ld\en", c);
1136 \&          return __real_malloc (c);
1137 \&        }
1138 .Ve
1139 If you link other code with this file using \f(CW--wrap malloc\fR, then
1140 all calls to \f(CWmalloc\fR will call the function \f(CW__wrap_malloc\fR
1141 instead.  The call to \f(CW__real_malloc\fR in \f(CW__wrap_malloc\fR will
1142 call the real \f(CWmalloc\fR function.
1143 .Sp
1144 You may wish to provide a \f(CW__real_malloc\fR function as well, so that
1145 links without the \f(CW--wrap\fR option will succeed.  If you do this,
1146 you should not put the definition of \f(CW__real_malloc\fR in the same
1147 file as \f(CW__wrap_malloc\fR; if you do, the assembler may resolve the
1148 call before the linker has a chance to wrap it to \f(CWmalloc\fR.
1149 .Ip "\f(CW--enable-new-dtags\fR" 4
1150 .Ip "\f(CW--disable-new-dtags\fR" 4
1151 This linker can create the new dynamic tags in \s-1ELF\s0. But the older \s-1ELF\s0
1152 systems may not understand them. If you specify
1153 \f(CW--enable-new-dtags\fR, the dynamic tags will be created as needed.
1154 If you specify \f(CW--disable-new-dtags\fR, no new dynamic tags will be
1155 created. By default, the new dynamic tags are not created. Note that
1156 those options are only available for \s-1ELF\s0 systems.
1157 .PP
1158 The i386 \s-1PE\s0 linker supports the \f(CW-shared\fR option, which causes
1159 the output to be a dynamically linked library (\s-1DLL\s0) instead of a
1160 normal executable.  You should name the output \f(CW*.dll\fR when you
1161 use this option.  In addition, the linker fully supports the standard
1162 \f(CW*.def\fR files, which may be specified on the linker command line
1163 like an object file (in fact, it should precede archives it exports
1164 symbols from, to ensure that they get linked in, just like a normal
1165 object file).
1166 .PP
1167 In addition to the options common to all targets, the i386 \s-1PE\s0 linker
1168 support additional command line options that are specific to the i386
1169 \s-1PE\s0 target.  Options that take values may be separated from their
1170 values by either a space or an equals sign.
1171 .Ip "\f(CW--add-stdcall-alias\fR" 4
1172 If given, symbols with a stdcall suffix (@\fInn\fR) will be exported
1173 as-is and also with the suffix stripped.
1174 .Ip "\f(CW--base-file \fIfile\fR\fR" 4
1175 Use \fIfile\fR as the name of a file in which to save the base
1176 addresses of all the relocations needed for generating DLLs with
1177 \fIdlltool\fR.
1178 .Ip "\f(CW--dll\fR" 4
1179 Create a \s-1DLL\s0 instead of a regular executable.  You may also use
1180 \f(CW-shared\fR or specify a \f(CWLIBRARY\fR in a given \f(CW.def\fR
1181 file.
1182 .Ip "\f(CW--enable-stdcall-fixup\fR" 4
1183 .Ip "\f(CW--disable-stdcall-fixup\fR" 4
1184 If the link finds a symbol that it cannot resolve, it will attempt to
1185 do \*(L"fuzzy linking\*(R" by looking for another defined symbol that differs
1186 only in the format of the symbol name (cdecl vs stdcall) and will
1187 resolve that symbol by linking to the match.  For example, the
1188 undefined symbol \f(CW_foo\fR might be linked to the function
1189 \f(CW_foo@12\fR, or the undefined symbol \f(CW_bar@16\fR might be linked
1190 to the function \f(CW_bar\fR.  When the linker does this, it prints a
1191 warning, since it normally should have failed to link, but sometimes
1192 import libraries generated from third-party dlls may need this feature
1193 to be usable.  If you specify \f(CW--enable-stdcall-fixup\fR, this
1194 feature is fully enabled and warnings are not printed.  If you specify
1195 \f(CW--disable-stdcall-fixup\fR, this feature is disabled and such
1196 mismatches are considered to be errors.
1197 .Ip "\f(CW--export-all-symbols\fR" 4
1198 If given, all global symbols in the objects used to build a \s-1DLL\s0 will
1199 be exported by the \s-1DLL\s0.  Note that this is the default if there
1200 otherwise wouldn't be any exported symbols.  When symbols are
1201 explicitly exported via \s-1DEF\s0 files or implicitly exported via function
1202 attributes, the default is to not export anything else unless this
1203 option is given.  Note that the symbols \f(CWDllMain@12\fR,
1204 \f(CWDllEntryPoint@0\fR, and \f(CWimpure_ptr\fR will not be automatically
1205 exported.
1206 .Ip "\f(CW--exclude-symbols \fIsymbol\fR,\fIsymbol\fR,...\fR" 4
1207 Specifies a list of symbols which should not be automatically
1208 exported.  The symbol names may be delimited by commas or colons.
1209 .Ip "\f(CW--file-alignment\fR" 4
1210 Specify the file alignment.  Sections in the file will always begin at
1211 file offsets which are multiples of this number.  This defaults to
1212 512.
1213 .Ip "\f(CW--heap \fIreserve\fR\fR" 4
1214 .Ip "\f(CW--heap \fIreserve\fR,\fIcommit\fR\fR" 4
1215 Specify the amount of memory to reserve (and optionally commit) to be
1216 used as heap for this program.  The default is 1Mb reserved, 4K
1217 committed.
1218 .Ip "\f(CW--image-base \fIvalue\fR\fR" 4
1219 Use \fIvalue\fR as the base address of your program or dll.  This is
1220 the lowest memory location that will be used when your program or dll
1221 is loaded.  To reduce the need to relocate and improve performance of
1222 your dlls, each should have a unique base address and not overlap any
1223 other dlls.  The default is 0x400000 for executables, and 0x10000000
1224 for dlls.
1225 .Ip "\f(CW--kill-at\fR" 4
1226 If given, the stdcall suffixes (@\fInn\fR) will be stripped from
1227 symbols before they are exported.
1228 .Ip "\f(CW--major-image-version \fIvalue\fR\fR" 4
1229 Sets the major number of the \*(L"image version\*(R".  Defaults to 1.
1230 .Ip "\f(CW--major-os-version \fIvalue\fR\fR" 4
1231 Sets the major number of the \*(L"os version\*(R".  Defaults to 4.
1232 .Ip "\f(CW--major-subsystem-version \fIvalue\fR\fR" 4
1233 Sets the major number of the \*(L"subsystem version\*(R".  Defaults to 4.
1234 .Ip "\f(CW--minor-image-version \fIvalue\fR\fR" 4
1235 Sets the minor number of the \*(L"image version\*(R".  Defaults to 0.
1236 .Ip "\f(CW--minor-os-version \fIvalue\fR\fR" 4
1237 Sets the minor number of the \*(L"os version\*(R".  Defaults to 0.
1238 .Ip "\f(CW--minor-subsystem-version \fIvalue\fR\fR" 4
1239 Sets the minor number of the \*(L"subsystem version\*(R".  Defaults to 0.
1240 .Ip "\f(CW--output-def \fIfile\fR\fR" 4
1241 The linker will create the file \fIfile\fR which will contain a \s-1DEF\s0
1242 file corresponding to the \s-1DLL\s0 the linker is generating.  This \s-1DEF\s0 file
1243 (which should be called \f(CW*.def\fR) may be used to create an import
1244 library with \f(CWdlltool\fR or may be used as a reference to
1245 automatically or implicitly exported symbols.
1246 .Ip "\f(CW--section-alignment\fR" 4
1247 Sets the section alignment.  Sections in memory will always begin at
1248 addresses which are a multiple of this number.  Defaults to 0x1000.
1249 .Ip "\f(CW--stack \fIreserve\fR\fR" 4
1250 .Ip "\f(CW--stack \fIreserve\fR,\fIcommit\fR\fR" 4
1251 Specify the amount of memory to reserve (and optionally commit) to be
1252 used as stack for this program.  The default is 32Mb reserved, 4K
1253 committed.
1254 .Ip "\f(CW--subsystem \fIwhich\fR\fR" 4
1255 .Ip "\f(CW--subsystem \fIwhich\fR:\fImajor\fR\fR" 4
1256 .Ip "\f(CW--subsystem \fIwhich\fR:\fImajor\fR.\fIminor\fR\fR" 4
1257 Specifies the subsystem under which your program will execute.  The
1258 legal values for \fIwhich\fR are \f(CWnative\fR, \f(CWwindows\fR,
1259 \f(CWconsole\fR, and \f(CWposix\fR.  You may optionally set the
1260 subsystem version also.
1261 .SH "ENVIRONMENT"
1262 You can change the behavior of \f(CWld\fR with the environment variables
1263 \f(CWGNUTARGET\fR, \f(CWLDEMULATION\fR, and \f(CWCOLLECT_NO_DEMANGLE\fR.
1264 .PP
1265 \f(CWGNUTARGET\fR determines the input-file object format if you don't
1266 use \fB\-b\fR (or its synonym \fB--format\fR).  Its value should be one
1267 of the BFD names for an input format.  If there is no
1268 \f(CWGNUTARGET\fR in the environment, \f(CWld\fR uses the natural format
1269 of the target. If \f(CWGNUTARGET\fR is set to \f(CWdefault\fR then BFD
1270 attempts to discover the input format by examining binary input files;
1271 this method often succeeds, but there are potential ambiguities, since
1272 there is no method of ensuring that the magic number used to specify
1273 object-file formats is unique.  However, the configuration procedure for
1274 BFD on each system places the conventional format for that system first
1275 in the search-list, so ambiguities are resolved in favor of convention.
1276 .PP
1277 \f(CWLDEMULATION\fR determines the default emulation if you don't use the
1278 \fB\-m\fR option.  The emulation can affect various aspects of linker
1279 behaviour, particularly the default linker script.  You can list the
1280 available emulations with the \fB--verbose\fR or \fB\-V\fR options.  If
1281 the \fB\-m\fR option is not used, and the \f(CWLDEMULATION\fR environment
1282 variable is not defined, the default emulation depends upon how the
1283 linker was configured.
1284 .PP
1285 Normally, the linker will default to demangling symbols.  However, if
1286 \f(CWCOLLECT_NO_DEMANGLE\fR is set in the environment, then it will
1287 default to not demangling symbols.  This environment variable is used in
1288 a similar fashion by the \f(CWgcc\fR linker wrapper program.  The default
1289 may be overridden by the \fB--demangle\fR and \fB--no-demangle\fR
1290 options.
1291 .SH "SEE ALSO"
1292 \fIar\fR\|(1), \fInm\fR\|(1), \fIobjcopy\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1) and
1293 the Info entries for \fIbinutils\fR and
1294 \fIld\fR.
1295 .SH "COPYRIGHT"
1296 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
1297 .PP
1298 Permission is granted to copy, distribute and/or modify this document
1299 under the terms of the GNU Free Documentation License, Version 1.1
1300 or any later version published by the Free Software Foundation;
1301 with no Invariant Sections, with no Front-Cover Texts, and with no
1302 Back-Cover Texts.  A copy of the license is included in the
1303 section entitled \*(L"GNU Free Documentation License\*(R".
1304
1305 .rn }` ''
1306 .IX Title "LD 1"
1307 .IX Name "ld - Using LD, the GNU linker"
1308
1309 .IX Header "NAME"
1310
1311 .IX Header "SYNOPSIS"
1312
1313 .IX Header "DESCRIPTION"
1314
1315 .IX Header "OPTIONS"
1316
1317 .IX Item "\f(CW-a\fIkeyword\fR\fR"
1318
1319 .IX Item "\f(CW-A\fIarchitecture\fR\fR"
1320
1321 .IX Item "\f(CW--architecture=\fIarchitecture\fR\fR"
1322
1323 .IX Item "\f(CW-b \fIinput-format\fR\fR"
1324
1325 .IX Item "\f(CW--format=\fIinput-format\fR\fR"
1326
1327 .IX Item "\f(CW-c \fIMRI-commandfile\fR\fR"
1328
1329 .IX Item "\f(CW--mri-script=\fIMRI-commandfile\fR\fR"
1330
1331 .IX Item "\f(CW-d\fR"
1332
1333 .IX Item "\f(CW-dc\fR"
1334
1335 .IX Item "\f(CW-dp\fR"
1336
1337 .IX Item "\f(CW-e \fIentry\fR\fR"
1338
1339 .IX Item "\f(CW--entry=\fIentry\fR\fR"
1340
1341 .IX Item "\f(CW-E\fR"
1342
1343 .IX Item "\f(CW--export-dynamic\fR"
1344
1345 .IX Item "\f(CW-EB\fR"
1346
1347 .IX Item "\f(CW-EL\fR"
1348
1349 .IX Item "\f(CW-f\fR"
1350
1351 .IX Item "\f(CW--auxiliary \fIname\fR\fR"
1352
1353 .IX Item "\f(CW-F \fIname\fR\fR"
1354
1355 .IX Item "\f(CW--filter \fIname\fR\fR"
1356
1357 .IX Item "\f(CW-fini \fIname\fR\fR"
1358
1359 .IX Item "\f(CW-g\fR"
1360
1361 .IX Item "\f(CW-G\fIvalue\fR\fR"
1362
1363 .IX Item "\f(CW--gpsize=\fIvalue\fR\fR"
1364
1365 .IX Item "\f(CW-h\fIname\fR\fR"
1366
1367 .IX Item "\f(CW-soname=\fIname\fR\fR"
1368
1369 .IX Item "\f(CW-i\fR"
1370
1371 .IX Item "\f(CW-init \fIname\fR\fR"
1372
1373 .IX Item "\f(CW-l\fIarchive\fR\fR"
1374
1375 .IX Item "\f(CW--library=\fIarchive\fR\fR"
1376
1377 .IX Item "\f(CW-L\fIsearchdir\fR\fR"
1378
1379 .IX Item "\f(CW--library-path=\fIsearchdir\fR\fR"
1380
1381 .IX Item "\f(CW-m\fIemulation\fR\fR"
1382
1383 .IX Item "\f(CW-M\fR"
1384
1385 .IX Item "\f(CW--print-map\fR"
1386
1387 .IX Item "\(bu"
1388
1389 .IX Item "\(bu"
1390
1391 .IX Item "\(bu"
1392
1393 .IX Item "\f(CW-n\fR"
1394
1395 .IX Item "\f(CW--nmagic\fR"
1396
1397 .IX Item "\f(CW-N\fR"
1398
1399 .IX Item "\f(CW--omagic\fR"
1400
1401 .IX Item "\f(CW-o \fIoutput\fR\fR"
1402
1403 .IX Item "\f(CW--output=\fIoutput\fR\fR"
1404
1405 .IX Item "\f(CW-O \fIlevel\fR\fR"
1406
1407 .IX Item "\f(CW-q\fR"
1408
1409 .IX Item "\f(CW--emit-relocs\fR"
1410
1411 .IX Item "\f(CW-r\fR"
1412
1413 .IX Item "\f(CW--relocateable\fR"
1414
1415 .IX Item "\f(CW-R \fIfilename\fR\fR"
1416
1417 .IX Item "\f(CW--just-symbols=\fIfilename\fR\fR"
1418
1419 .IX Item "\f(CW-s\fR"
1420
1421 .IX Item "\f(CW--strip-all\fR"
1422
1423 .IX Item "\f(CW-S\fR"
1424
1425 .IX Item "\f(CW--strip-debug\fR"
1426
1427 .IX Item "\f(CW-t\fR"
1428
1429 .IX Item "\f(CW--trace\fR"
1430
1431 .IX Item "\f(CW-T \fIscriptfile\fR\fR"
1432
1433 .IX Item "\f(CW--script=\fIscriptfile\fR\fR"
1434
1435 .IX Item "\f(CW-u \fIsymbol\fR\fR"
1436
1437 .IX Item "\f(CW--undefined=\fIsymbol\fR\fR"
1438
1439 .IX Item "\f(CW-Ur\fR"
1440
1441 .IX Item "\f(CW--unique[=\fISECTION\fR]\fR"
1442
1443 .IX Item "\f(CW-v\fR"
1444
1445 .IX Item "\f(CW--version\fR"
1446
1447 .IX Item "\f(CW-V\fR"
1448
1449 .IX Item "\f(CW-x\fR"
1450
1451 .IX Item "\f(CW--discard-all\fR"
1452
1453 .IX Item "\f(CW-X\fR"
1454
1455 .IX Item "\f(CW--discard-locals\fR"
1456
1457 .IX Item "\f(CW-y \fIsymbol\fR\fR"
1458
1459 .IX Item "\f(CW--trace-symbol=\fIsymbol\fR\fR"
1460
1461 .IX Item "\f(CW-Y \fIpath\fR\fR"
1462
1463 .IX Item "\f(CW-z \fIkeyword\fR\fR"
1464
1465 .IX Item "\f(CW-( \fIarchives\fR -)\fR"
1466
1467 .IX Item "\f(CW--start-group \fIarchives\fR --end-group\fR"
1468
1469 .IX Item "\f(CW-assert \fIkeyword\fR\fR"
1470
1471 .IX Item "\f(CW-Bdynamic\fR"
1472
1473 .IX Item "\f(CW-dy\fR"
1474
1475 .IX Item "\f(CW-call_shared\fR"
1476
1477 .IX Item "\f(CW-Bgroup\fR"
1478
1479 .IX Item "\f(CW-Bstatic\fR"
1480
1481 .IX Item "\f(CW-dn\fR"
1482
1483 .IX Item "\f(CW-non_shared\fR"
1484
1485 .IX Item "\f(CW-static\fR"
1486
1487 .IX Item "\f(CW-Bsymbolic\fR"
1488
1489 .IX Item "\f(CW--check-sections\fR"
1490
1491 .IX Item "\f(CW--no-check-sections\fR"
1492
1493 .IX Item "\f(CW--cref\fR"
1494
1495 .IX Item "\f(CW--defsym \fIsymbol\fR=\fIexpression\fR\fR"
1496
1497 .IX Item "\f(CW--demangle[=\fIstyle\fR]\fR"
1498
1499 .IX Item "\f(CW--no-demangle\fR"
1500
1501 .IX Item "\f(CW--dynamic-linker \fIfile\fR\fR"
1502
1503 .IX Item "\f(CW--embedded-relocs\fR"
1504
1505 .IX Item "\f(CW--fatal-warnings\fR"
1506
1507 .IX Item "\f(CW--force-exe-suffix\fR"
1508
1509 .IX Item "\f(CW--no-gc-sections\fR"
1510
1511 .IX Item "\f(CW--gc-sections\fR"
1512
1513 .IX Item "\f(CW--help\fR"
1514
1515 .IX Item "\f(CW--target-help\fR"
1516
1517 .IX Item "\f(CW-Map \fImapfile\fR\fR"
1518
1519 .IX Item "\f(CW--no-keep-memory\fR"
1520
1521 .IX Item "\f(CW--no-undefined\fR"
1522
1523 .IX Item "\f(CW-z defs\fR"
1524
1525 .IX Item "\f(CW--allow-shlib-undefined\fR"
1526
1527 .IX Item "\f(CW--no-warn-mismatch\fR"
1528
1529 .IX Item "\f(CW--no-whole-archive\fR"
1530
1531 .IX Item "\f(CW--noinhibit-exec\fR"
1532
1533 .IX Item "\f(CW--oformat \fIoutput-format\fR\fR"
1534
1535 .IX Item "\f(CW-qmagic\fR"
1536
1537 .IX Item "\f(CW-Qy\fR"
1538
1539 .IX Item "\f(CW--relax\fR"
1540
1541 .IX Item "\f(CW--retain-symbols-file \fIfilename\fR\fR"
1542
1543 .IX Item "\f(CW-rpath \fIdir\fR\fR"
1544
1545 .IX Item "\f(CW-rpath-link \fIDIR\fR\fR"
1546
1547 .IX Item "1."
1548
1549 .IX Item "2."
1550
1551 .IX Item "3."
1552
1553 .IX Item "4."
1554
1555 .IX Item "5."
1556
1557 .IX Item "6."
1558
1559 .IX Item "7."
1560
1561 .IX Item "8."
1562
1563 .IX Item "\f(CW-shared\fR"
1564
1565 .IX Item "\f(CW-Bshareable\fR"
1566
1567 .IX Item "\f(CW--sort-common\fR"
1568
1569 .IX Item "\f(CW--split-by-file [\fIsize\fR]\fR"
1570
1571 .IX Item "\f(CW--split-by-reloc [\fIcount\fR]\fR"
1572
1573 .IX Item "\f(CW--stats\fR"
1574
1575 .IX Item "\f(CW--traditional-format\fR"
1576
1577 .IX Item "\f(CW--section-start \fIsectionname\fR=\fIorg\fR\fR"
1578
1579 .IX Item "\f(CW-Tbss \fIorg\fR\fR"
1580
1581 .IX Item "\f(CW-Tdata \fIorg\fR\fR"
1582
1583 .IX Item "\f(CW-Ttext \fIorg\fR\fR"
1584
1585 .IX Item "\f(CW--dll-verbose\fR"
1586
1587 .IX Item "\f(CW--verbose\fR"
1588
1589 .IX Item "\f(CW--version-script=\fIversion-scriptfile\fR\fR"
1590
1591 .IX Item "\f(CW--warn-common\fR"
1592
1593 .IX Item "\fBint i = 1;\fR"
1594
1595 .IX Item "\fBextern int i;\fR"
1596
1597 .IX Item "\fBint i;\fR"
1598
1599 .IX Item "1."
1600
1601 .IX Item "2."
1602
1603 .IX Item "3."
1604
1605 .IX Item "4."
1606
1607 .IX Item "5."
1608
1609 .IX Item "\f(CW--warn-constructors\fR"
1610
1611 .IX Item "\f(CW--warn-multiple-gp\fR"
1612
1613 .IX Item "\f(CW--warn-once\fR"
1614
1615 .IX Item "\f(CW--warn-section-align\fR"
1616
1617 .IX Item "\f(CW--whole-archive\fR"
1618
1619 .IX Item "\f(CW--wrap \fIsymbol\fR\fR"
1620
1621 .IX Item "\f(CW--enable-new-dtags\fR"
1622
1623 .IX Item "\f(CW--disable-new-dtags\fR"
1624
1625 .IX Item "\f(CW--add-stdcall-alias\fR"
1626
1627 .IX Item "\f(CW--base-file \fIfile\fR\fR"
1628
1629 .IX Item "\f(CW--dll\fR"
1630
1631 .IX Item "\f(CW--enable-stdcall-fixup\fR"
1632
1633 .IX Item "\f(CW--disable-stdcall-fixup\fR"
1634
1635 .IX Item "\f(CW--export-all-symbols\fR"
1636
1637 .IX Item "\f(CW--exclude-symbols \fIsymbol\fR,\fIsymbol\fR,...\fR"
1638
1639 .IX Item "\f(CW--file-alignment\fR"
1640
1641 .IX Item "\f(CW--heap \fIreserve\fR\fR"
1642
1643 .IX Item "\f(CW--heap \fIreserve\fR,\fIcommit\fR\fR"
1644
1645 .IX Item "\f(CW--image-base \fIvalue\fR\fR"
1646
1647 .IX Item "\f(CW--kill-at\fR"
1648
1649 .IX Item "\f(CW--major-image-version \fIvalue\fR\fR"
1650
1651 .IX Item "\f(CW--major-os-version \fIvalue\fR\fR"
1652
1653 .IX Item "\f(CW--major-subsystem-version \fIvalue\fR\fR"
1654
1655 .IX Item "\f(CW--minor-image-version \fIvalue\fR\fR"
1656
1657 .IX Item "\f(CW--minor-os-version \fIvalue\fR\fR"
1658
1659 .IX Item "\f(CW--minor-subsystem-version \fIvalue\fR\fR"
1660
1661 .IX Item "\f(CW--output-def \fIfile\fR\fR"
1662
1663 .IX Item "\f(CW--section-alignment\fR"
1664
1665 .IX Item "\f(CW--stack \fIreserve\fR\fR"
1666
1667 .IX Item "\f(CW--stack \fIreserve\fR,\fIcommit\fR\fR"
1668
1669 .IX Item "\f(CW--subsystem \fIwhich\fR\fR"
1670
1671 .IX Item "\f(CW--subsystem \fIwhich\fR:\fImajor\fR\fR"
1672
1673 .IX Item "\f(CW--subsystem \fIwhich\fR:\fImajor\fR.\fIminor\fR\fR"
1674
1675 .IX Header "ENVIRONMENT"
1676
1677 .IX Header "SEE ALSO"
1678
1679 .IX Header "COPYRIGHT"
1680