OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / darwin-x86 / toolchain / arm-eabi-4.4.3 / man / man1 / arm-eabi-dlltool.1
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  | will give a
29 .\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
30 .\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
31 .\" expand to `' in nroff, nothing in troff, for use with C<>.
32 .tr \(*W-|\(bv\*(Tr
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .\"
67 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
68 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
69 .    \" fudge factors for nroff and troff
70 .if n \{\
71 .    ds #H 0
72 .    ds #V .8m
73 .    ds #F .3m
74 .    ds #[ \f1
75 .    ds #] \fP
76 .\}
77 .if t \{\
78 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
79 .    ds #V .6m
80 .    ds #F 0
81 .    ds #[ \&
82 .    ds #] \&
83 .\}
84 .    \" simple accents for nroff and troff
85 .if n \{\
86 .    ds ' \&
87 .    ds ` \&
88 .    ds ^ \&
89 .    ds , \&
90 .    ds ~ ~
91 .    ds /
92 .\}
93 .if t \{\
94 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
95 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
96 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
97 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
98 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
99 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
100 .\}
101 .    \" troff and (daisy-wheel) nroff accents
102 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
103 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
104 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
105 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
106 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
107 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
108 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
109 .ds ae a\h'-(\w'a'u*4/10)'e
110 .ds Ae A\h'-(\w'A'u*4/10)'E
111 .    \" corrections for vroff
112 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
113 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
114 .    \" for low resolution devices (crt and lpr)
115 .if \n(.H>23 .if \n(.V>19 \
116 \{\
117 .    ds : e
118 .    ds 8 ss
119 .    ds o a
120 .    ds d- d\h'-1'\(ga
121 .    ds D- D\h'-1'\(hy
122 .    ds th \o'bp'
123 .    ds Th \o'LP'
124 .    ds ae ae
125 .    ds Ae AE
126 .\}
127 .rm #[ #] #H #V #F C
128 .\" ========================================================================
129 .\"
130 .IX Title "DLLTOOL 1"
131 .TH DLLTOOL 1 "2008-09-10" "binutils-2.18.90" "GNU Development Tools"
132 .SH "NAME"
133 dlltool \- Create files needed to build and use DLLs.
134 .SH "SYNOPSIS"
135 .IX Header "SYNOPSIS"
136 dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR]
137         [\fB\-b\fR|\fB\-\-base\-file\fR \fIbase-file-name\fR]
138         [\fB\-e\fR|\fB\-\-output\-exp\fR \fIexports-file-name\fR]
139         [\fB\-z\fR|\fB\-\-output\-def\fR \fIdef-file-name\fR]
140         [\fB\-l\fR|\fB\-\-output\-lib\fR \fIlibrary-file-name\fR]
141         [\fB\-\-export\-all\-symbols\fR] [\fB\-\-no\-export\-all\-symbols\fR]
142         [\fB\-\-exclude\-symbols\fR \fIlist\fR]
143         [\fB\-\-no\-default\-excludes\fR]
144         [\fB\-S\fR|\fB\-\-as\fR \fIpath-to-assembler\fR] [\fB\-f\fR|\fB\-\-as\-flags\fR \fIoptions\fR]
145         [\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR]
146         [\fB\-a\fR|\fB\-\-add\-indirect\fR]
147         [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-\-add\-stdcall\-underscore\fR]
148         [\fB\-k\fR|\fB\-\-kill\-at\fR] [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR]
149         [\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR]
150         [\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-i\fR|\fB\-\-interwork\fR]
151         [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR]
152         [\fB\-v\fR|\fB\-\-verbose\fR]
153         [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
154         [object\-file ...]
155 .SH "DESCRIPTION"
156 .IX Header "DESCRIPTION"
157 \&\fBdlltool\fR reads its inputs, which can come from the \fB\-d\fR and
158 \&\fB\-b\fR options as well as object files specified on the command
159 line.  It then processes these inputs and if the \fB\-e\fR option has
160 been specified it creates a exports file.  If the \fB\-l\fR option
161 has been specified it creates a library file and if the \fB\-z\fR option
162 has been specified it creates a def file.  Any or all of the \fB\-e\fR,
163 \&\fB\-l\fR and \fB\-z\fR options can be present in one invocation of
164 dlltool.
165 .PP
166 When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is necessary
167 to have three other files.  \fBdlltool\fR can help with the creation of
168 these files.
169 .PP
170 The first file is a \fI.def\fR file which specifies which functions are
171 exported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on.  This
172 is a text file and can be created by hand, or \fBdlltool\fR can be used
173 to create it using the \fB\-z\fR option.  In this case \fBdlltool\fR
174 will scan the object files specified on its command line looking for
175 those functions which have been specially marked as being exported and
176 put entries for them in the \fI.def\fR file it creates.
177 .PP
178 In order to mark a function as being exported from a \s-1DLL\s0, it needs to
179 have an \fB\-export:<name_of_function>\fR entry in the \fB.drectve\fR
180 section of the object file.  This can be done in C by using the
181 \&\fIasm()\fR operator:
182 .PP
183 .Vb 2
184 \&          asm (".section .drectve");
185 \&          asm (".ascii \e"-export:my_func\e"");
186 .Ve
187 .PP
188 .Vb 1
189 \&          int my_func (void) { ... }
190 .Ve
191 .PP
192 The second file needed for \s-1DLL\s0 creation is an exports file.  This file
193 is linked with the object files that make up the body of the \s-1DLL\s0 and it
194 handles the interface between the \s-1DLL\s0 and the outside world.  This is a
195 binary file and it can be created by giving the \fB\-e\fR option to
196 \&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file.
197 .PP
198 The third file needed for \s-1DLL\s0 creation is the library file that programs
199 will link with in order to access the functions in the \s-1DLL\s0.  This file
200 can be created by giving the \fB\-l\fR option to dlltool when it
201 is creating or reading in a \fI.def\fR file.
202 .PP
203 \&\fBdlltool\fR builds the library file by hand, but it builds the
204 exports file by creating temporary files containing assembler statements
205 and then assembling these.  The \fB\-S\fR command line option can be
206 used to specify the path to the assembler that dlltool will use,
207 and the \fB\-f\fR option can be used to pass specific flags to that
208 assembler.  The \fB\-n\fR can be used to prevent dlltool from deleting
209 these temporary assembler files when it is done, and if \fB\-n\fR is
210 specified twice then this will prevent dlltool from deleting the
211 temporary object files it used to build the library.
212 .PP
213 Here is an example of creating a \s-1DLL\s0 from a source file \fBdll.c\fR and
214 also creating a program (from an object file called \fBprogram.o\fR)
215 that uses that \s-1DLL:\s0
216 .PP
217 .Vb 4
218 \&          gcc -c dll.c
219 \&          dlltool -e exports.o -l dll.lib dll.o
220 \&          gcc dll.o exports.o -o dll.dll
221 \&          gcc program.o dll.lib -o program
222 .Ve
223 .SH "OPTIONS"
224 .IX Header "OPTIONS"
225 The command line options have the following meanings:
226 .IP "\fB\-d\fR \fIfilename\fR" 4
227 .IX Item "-d filename"
228 .PD 0
229 .IP "\fB\-\-input\-def\fR \fIfilename\fR" 4
230 .IX Item "--input-def filename"
231 .PD
232 Specifies the name of a \fI.def\fR file to be read in and processed.
233 .IP "\fB\-b\fR \fIfilename\fR" 4
234 .IX Item "-b filename"
235 .PD 0
236 .IP "\fB\-\-base\-file\fR \fIfilename\fR" 4
237 .IX Item "--base-file filename"
238 .PD
239 Specifies the name of a base file to be read in and processed.  The
240 contents of this file will be added to the relocation section in the
241 exports file generated by dlltool.
242 .IP "\fB\-e\fR \fIfilename\fR" 4
243 .IX Item "-e filename"
244 .PD 0
245 .IP "\fB\-\-output\-exp\fR \fIfilename\fR" 4
246 .IX Item "--output-exp filename"
247 .PD
248 Specifies the name of the export file to be created by dlltool.
249 .IP "\fB\-z\fR \fIfilename\fR" 4
250 .IX Item "-z filename"
251 .PD 0
252 .IP "\fB\-\-output\-def\fR \fIfilename\fR" 4
253 .IX Item "--output-def filename"
254 .PD
255 Specifies the name of the \fI.def\fR file to be created by dlltool.
256 .IP "\fB\-l\fR \fIfilename\fR" 4
257 .IX Item "-l filename"
258 .PD 0
259 .IP "\fB\-\-output\-lib\fR \fIfilename\fR" 4
260 .IX Item "--output-lib filename"
261 .PD
262 Specifies the name of the library file to be created by dlltool.
263 .IP "\fB\-\-export\-all\-symbols\fR" 4
264 .IX Item "--export-all-symbols"
265 Treat all global and weak defined symbols found in the input object
266 files as symbols to be exported.  There is a small list of symbols which
267 are not exported by default; see the \fB\-\-no\-default\-excludes\fR
268 option.  You may add to the list of symbols to not export by using the
269 \&\fB\-\-exclude\-symbols\fR option.
270 .IP "\fB\-\-no\-export\-all\-symbols\fR" 4
271 .IX Item "--no-export-all-symbols"
272 Only export symbols explicitly listed in an input \fI.def\fR file or in
273 \&\fB.drectve\fR sections in the input object files.  This is the default
274 behaviour.  The \fB.drectve\fR sections are created by \fBdllexport\fR
275 attributes in the source code.
276 .IP "\fB\-\-exclude\-symbols\fR \fIlist\fR" 4
277 .IX Item "--exclude-symbols list"
278 Do not export the symbols in \fIlist\fR.  This is a list of symbol names
279 separated by comma or colon characters.  The symbol names should not
280 contain a leading underscore.  This is only meaningful when
281 \&\fB\-\-export\-all\-symbols\fR is used.
282 .IP "\fB\-\-no\-default\-excludes\fR" 4
283 .IX Item "--no-default-excludes"
284 When \fB\-\-export\-all\-symbols\fR is used, it will by default avoid
285 exporting certain special symbols.  The current list of symbols to avoid
286 exporting is \fBDllMain@12\fR, \fBDllEntryPoint@0\fR,
287 \&\fBimpure_ptr\fR.  You may use the \fB\-\-no\-default\-excludes\fR option
288 to go ahead and export these special symbols.  This is only meaningful
289 when \fB\-\-export\-all\-symbols\fR is used.
290 .IP "\fB\-S\fR \fIpath\fR" 4
291 .IX Item "-S path"
292 .PD 0
293 .IP "\fB\-\-as\fR \fIpath\fR" 4
294 .IX Item "--as path"
295 .PD
296 Specifies the path, including the filename, of the assembler to be used
297 to create the exports file.
298 .IP "\fB\-f\fR \fIoptions\fR" 4
299 .IX Item "-f options"
300 .PD 0
301 .IP "\fB\-\-as\-flags\fR \fIoptions\fR" 4
302 .IX Item "--as-flags options"
303 .PD
304 Specifies any specific command line options to be passed to the
305 assembler when building the exports file.  This option will work even if
306 the \fB\-S\fR option is not used.  This option only takes one argument,
307 and if it occurs more than once on the command line, then later
308 occurrences will override earlier occurrences.  So if it is necessary to
309 pass multiple options to the assembler they should be enclosed in
310 double quotes.
311 .IP "\fB\-D\fR \fIname\fR" 4
312 .IX Item "-D name"
313 .PD 0
314 .IP "\fB\-\-dll\-name\fR \fIname\fR" 4
315 .IX Item "--dll-name name"
316 .PD
317 Specifies the name to be stored in the \fI.def\fR file as the name of
318 the \s-1DLL\s0 when the \fB\-e\fR option is used.  If this option is not
319 present, then the filename given to the \fB\-e\fR option will be
320 used as the name of the \s-1DLL\s0.
321 .IP "\fB\-m\fR \fImachine\fR" 4
322 .IX Item "-m machine"
323 .PD 0
324 .IP "\fB\-machine\fR \fImachine\fR" 4
325 .IX Item "-machine machine"
326 .PD
327 Specifies the type of machine for which the library file should be
328 built.  \fBdlltool\fR has a built in default type, depending upon how
329 it was created, but this option can be used to override that.  This is
330 normally only useful when creating DLLs for an \s-1ARM\s0 processor, when the
331 contents of the \s-1DLL\s0 are actually encode using Thumb instructions.
332 .IP "\fB\-a\fR" 4
333 .IX Item "-a"
334 .PD 0
335 .IP "\fB\-\-add\-indirect\fR" 4
336 .IX Item "--add-indirect"
337 .PD
338 Specifies that when \fBdlltool\fR is creating the exports file it
339 should add a section which allows the exported functions to be
340 referenced without using the import library.  Whatever the hell that
341 means!
342 .IP "\fB\-U\fR" 4
343 .IX Item "-U"
344 .PD 0
345 .IP "\fB\-\-add\-underscore\fR" 4
346 .IX Item "--add-underscore"
347 .PD
348 Specifies that when \fBdlltool\fR is creating the exports file it
349 should prepend an underscore to the names of \fIall\fR exported symbols.
350 .IP "\fB\-\-add\-stdcall\-underscore\fR" 4
351 .IX Item "--add-stdcall-underscore"
352 Specifies that when \fBdlltool\fR is creating the exports file it
353 should prepend an underscore to the names of exported \fIstdcall\fR
354 functions. Variable names and non-stdcall function names are not modified.
355 This option is useful when creating GNU-compatible import libs for third
356 party DLLs that were built with MS-Windows tools.
357 .IP "\fB\-k\fR" 4
358 .IX Item "-k"
359 .PD 0
360 .IP "\fB\-\-kill\-at\fR" 4
361 .IX Item "--kill-at"
362 .PD
363 Specifies that when \fBdlltool\fR is creating the exports file it
364 should not append the string \fB@ <number>\fR.  These numbers are
365 called ordinal numbers and they represent another way of accessing the
366 function in a \s-1DLL\s0, other than by name.
367 .IP "\fB\-A\fR" 4
368 .IX Item "-A"
369 .PD 0
370 .IP "\fB\-\-add\-stdcall\-alias\fR" 4
371 .IX Item "--add-stdcall-alias"
372 .PD
373 Specifies that when \fBdlltool\fR is creating the exports file it
374 should add aliases for stdcall symbols without \fB@ <number>\fR
375 in addition to the symbols with \fB@ <number>\fR.
376 .IP "\fB\-p\fR" 4
377 .IX Item "-p"
378 .PD 0
379 .IP "\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR" 4
380 .IX Item "--ext-prefix-alias prefix"
381 .PD
382 Causes \fBdlltool\fR to create external aliases for all \s-1DLL\s0
383 imports with the specified prefix.  The aliases are created for both
384 external and import symbols with no leading underscore.
385 .IP "\fB\-x\fR" 4
386 .IX Item "-x"
387 .PD 0
388 .IP "\fB\-\-no\-idata4\fR" 4
389 .IX Item "--no-idata4"
390 .PD
391 Specifies that when \fBdlltool\fR is creating the exports and library
392 files it should omit the \f(CW\*(C`.idata4\*(C'\fR section.  This is for compatibility
393 with certain operating systems.
394 .IP "\fB\-c\fR" 4
395 .IX Item "-c"
396 .PD 0
397 .IP "\fB\-\-no\-idata5\fR" 4
398 .IX Item "--no-idata5"
399 .PD
400 Specifies that when \fBdlltool\fR is creating the exports and library
401 files it should omit the \f(CW\*(C`.idata5\*(C'\fR section.  This is for compatibility
402 with certain operating systems.
403 .IP "\fB\-i\fR" 4
404 .IX Item "-i"
405 .PD 0
406 .IP "\fB\-\-interwork\fR" 4
407 .IX Item "--interwork"
408 .PD
409 Specifies that \fBdlltool\fR should mark the objects in the library
410 file and exports file that it produces as supporting interworking
411 between \s-1ARM\s0 and Thumb code.
412 .IP "\fB\-n\fR" 4
413 .IX Item "-n"
414 .PD 0
415 .IP "\fB\-\-nodelete\fR" 4
416 .IX Item "--nodelete"
417 .PD
418 Makes \fBdlltool\fR preserve the temporary assembler files it used to
419 create the exports file.  If this option is repeated then dlltool will
420 also preserve the temporary object files it uses to create the library
421 file.
422 .IP "\fB\-t\fR \fIprefix\fR" 4
423 .IX Item "-t prefix"
424 .PD 0
425 .IP "\fB\-\-temp\-prefix\fR \fIprefix\fR" 4
426 .IX Item "--temp-prefix prefix"
427 .PD
428 Makes \fBdlltool\fR use \fIprefix\fR when constructing the names of
429 temporary assembler and object files.  By default, the temp file prefix
430 is generated from the pid.
431 .IP "\fB\-v\fR" 4
432 .IX Item "-v"
433 .PD 0
434 .IP "\fB\-\-verbose\fR" 4
435 .IX Item "--verbose"
436 .PD
437 Make dlltool describe what it is doing.
438 .IP "\fB\-h\fR" 4
439 .IX Item "-h"
440 .PD 0
441 .IP "\fB\-\-help\fR" 4
442 .IX Item "--help"
443 .PD
444 Displays a list of command line options and then exits.
445 .IP "\fB\-V\fR" 4
446 .IX Item "-V"
447 .PD 0
448 .IP "\fB\-\-version\fR" 4
449 .IX Item "--version"
450 .PD
451 Displays dlltool's version number and then exits.
452 .IP "\fB@\fR\fIfile\fR" 4
453 .IX Item "@file"
454 Read command-line options from \fIfile\fR.  The options read are
455 inserted in place of the original @\fIfile\fR option.  If \fIfile\fR
456 does not exist, or cannot be read, then the option will be treated
457 literally, and not removed.  
458 .Sp
459 Options in \fIfile\fR are separated by whitespace.  A whitespace
460 character may be included in an option by surrounding the entire
461 option in either single or double quotes.  Any character (including a
462 backslash) may be included by prefixing the character to be included
463 with a backslash.  The \fIfile\fR may itself contain additional
464 @\fIfile\fR options; any such options will be processed recursively.
465 .SH "SEE ALSO"
466 .IX Header "SEE ALSO"
467 The Info pages for \fIbinutils\fR.
468 .SH "COPYRIGHT"
469 .IX Header "COPYRIGHT"
470 Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
471 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
472 .PP
473 Permission is granted to copy, distribute and/or modify this document
474 under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2
475 or any later version published by the Free Software Foundation;
476 with no Invariant Sections, with no Front-Cover Texts, and with no
477 Back-Cover Texts.  A copy of the license is included in the
478 section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".