Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 Standard preamble: ========================================================================
\\$1
..
..
..
..
Set up some character translations and predefined strings. \*(-- will give an unbreakable dash, \*(PI will give pi, \*(L" will give a left double quote, and \*(R" will give a right double quote. | will give a real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to do unbreakable dashes and therefore won't be available. \*(C` and \*(C' expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-|\(bv\*(Tr
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
If the F register is turned on, we'll generate index entries on stderr for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index entries marked with X<> in POD. Of course, you'll have to process the output yourself in some meaningful fashion.. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
For nroff, turn off justification. Always turn off hyphenation; it makes way too many mistakes in technical documents. Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #]
.\}
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
. \" corrections for vroff
. \" for low resolution devices (crt and lpr)
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
======================================================================== Title "DLLTOOL 1" DLLTOOL 1 "2008-09-10" "binutils-2.18.90" "GNU Development Tools"
"NAME"
dlltool - Create files needed to build and use DLLs.
"SYNOPSIS"
Header "SYNOPSIS" dlltool [
-d|
--input-def def-file-name]
[
-b|
--base-file base-file-name]
[
-e|
--output-exp exports-file-name]
[
-z|
--output-def def-file-name]
[
-l|
--output-lib library-file-name]
[
--export-all-symbols] [
--no-export-all-symbols]
[
--exclude-symbols list]
[
--no-default-excludes]
[
-S|
--as path-to-assembler] [
-f|
--as-flags options]
[
-D|
--dllname name] [
-m|
--machine machine]
[
-a|
--add-indirect]
[
-U|
--add-underscore] [
--add-stdcall-underscore]
[
-k|
--kill-at] [
-A|
--add-stdcall-alias]
[
-p|
--ext-prefix-alias prefix]
[
-x|
--no-idata4] [
-c|
--no-idata5] [
-i|
--interwork]
[
-n|
--nodelete] [
-t|
--temp-prefix prefix]
[
-v|
--verbose]
[
-h|
--help] [
-V|
--version]
[object-file ...]
"DESCRIPTION"
Header "DESCRIPTION" \fBdlltool reads its inputs, which can come from the
-d and
\fB-b options as well as object files specified on the command
line. It then processes these inputs and if the
-e option has
been specified it creates a exports file. If the
-l option
has been specified it creates a library file and if the
-z option
has been specified it creates a def file. Any or all of the
-e,
\fB-l and
-z options can be present in one invocation of
dlltool.
When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is necessary
to have three other files. dlltool can help with the creation of
these files.
The first file is a .def file which specifies which functions are
exported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on. This
is a text file and can be created by hand, or dlltool can be used
to create it using the -z option. In this case dlltool
will scan the object files specified on its command line looking for
those functions which have been specially marked as being exported and
put entries for them in the .def file it creates.
In order to mark a function as being exported from a \s-1DLL\s0, it needs to
have an -export:<name_of_function> entry in the .drectve
section of the object file. This can be done in C by using the
\fIasm() operator:
.Vb 2
asm (".section .drectve");
asm (".ascii \e"-export:my_func\e"");
.Ve
.Vb 1
int my_func (void) { ... }
.Ve
The second file needed for \s-1DLL\s0 creation is an exports file. This file
is linked with the object files that make up the body of the \s-1DLL\s0 and it
handles the interface between the \s-1DLL\s0 and the outside world. This is a
binary file and it can be created by giving the -e option to
\fBdlltool when it is creating or reading in a .def file.
The third file needed for \s-1DLL\s0 creation is the library file that programs
will link with in order to access the functions in the \s-1DLL\s0. This file
can be created by giving the -l option to dlltool when it
is creating or reading in a .def file.
\fBdlltool builds the library file by hand, but it builds the
exports file by creating temporary files containing assembler statements
and then assembling these. The -S command line option can be
used to specify the path to the assembler that dlltool will use,
and the -f option can be used to pass specific flags to that
assembler. The -n can be used to prevent dlltool from deleting
these temporary assembler files when it is done, and if -n is
specified twice then this will prevent dlltool from deleting the
temporary object files it used to build the library.
Here is an example of creating a \s-1DLL\s0 from a source file dll.c and
also creating a program (from an object file called program.o)
that uses that \s-1DLL:\s0
.Vb 4
gcc -c dll.c
dlltool -e exports.o -l dll.lib dll.o
gcc dll.o exports.o -o dll.dll
gcc program.o dll.lib -o program
.Ve
"OPTIONS"
Header "OPTIONS" The command line options have the following meanings:
"-d filename" 4
Item "-d filename" 0
"--input-def filename" 4
Item "--input-def filename"
Specifies the name of a .def file to be read in and processed.
"-b filename" 4
Item "-b filename" 0
"--base-file filename" 4
Item "--base-file filename"
Specifies the name of a base file to be read in and processed. The
contents of this file will be added to the relocation section in the
exports file generated by dlltool.
"-e filename" 4
Item "-e filename" 0
"--output-exp filename" 4
Item "--output-exp filename"
Specifies the name of the export file to be created by dlltool.
"-z filename" 4
Item "-z filename" 0
"--output-def filename" 4
Item "--output-def filename"
Specifies the name of the .def file to be created by dlltool.
"-l filename" 4
Item "-l filename" 0
"--output-lib filename" 4
Item "--output-lib filename"
Specifies the name of the library file to be created by dlltool.
"--export-all-symbols" 4
Item "--export-all-symbols" Treat all global and weak defined symbols found in the input object
files as symbols to be exported. There is a small list of symbols which
are not exported by default; see the
--no-default-excludes
option. You may add to the list of symbols to not export by using the
\fB--exclude-symbols option.
"--no-export-all-symbols" 4
Item "--no-export-all-symbols" Only export symbols explicitly listed in an input
.def file or in
\fB.drectve sections in the input object files. This is the default
behaviour. The
.drectve sections are created by
dllexport
attributes in the source code.
"--exclude-symbols list" 4
Item "--exclude-symbols list" Do not export the symbols in
list. This is a list of symbol names
separated by comma or colon characters. The symbol names should not
contain a leading underscore. This is only meaningful when
\fB--export-all-symbols is used.
"--no-default-excludes" 4
Item "--no-default-excludes" When
--export-all-symbols is used, it will by default avoid
exporting certain special symbols. The current list of symbols to avoid
exporting is
DllMain@12,
DllEntryPoint@0,
\fBimpure_ptr. You may use the
--no-default-excludes option
to go ahead and export these special symbols. This is only meaningful
when
--export-all-symbols is used.
"-S path" 4
Item "-S path" 0
"--as path" 4
Item "--as path"
Specifies the path, including the filename, of the assembler to be used
to create the exports file.
"-f options" 4
Item "-f options" 0
"--as-flags options" 4
Item "--as-flags options"
Specifies any specific command line options to be passed to the
assembler when building the exports file. This option will work even if
the -S option is not used. This option only takes one argument,
and if it occurs more than once on the command line, then later
occurrences will override earlier occurrences. So if it is necessary to
pass multiple options to the assembler they should be enclosed in
double quotes.
"-D name" 4
Item "-D name" 0
"--dll-name name" 4
Item "--dll-name name"
Specifies the name to be stored in the .def file as the name of
the \s-1DLL\s0 when the -e option is used. If this option is not
present, then the filename given to the -e option will be
used as the name of the \s-1DLL\s0.
"-m machine" 4
Item "-m machine" 0
"-machine machine" 4
Item "-machine machine"
Specifies the type of machine for which the library file should be
built. dlltool has a built in default type, depending upon how
it was created, but this option can be used to override that. This is
normally only useful when creating DLLs for an \s-1ARM\s0 processor, when the
contents of the \s-1DLL\s0 are actually encode using Thumb instructions.
"-a" 4
Item "-a" 0
"--add-indirect" 4
Item "--add-indirect"
Specifies that when dlltool is creating the exports file it
should add a section which allows the exported functions to be
referenced without using the import library. Whatever the hell that
means!
"-U" 4
Item "-U" 0
"--add-underscore" 4
Item "--add-underscore"
Specifies that when dlltool is creating the exports file it
should prepend an underscore to the names of all exported symbols.
"--add-stdcall-underscore" 4
Item "--add-stdcall-underscore" Specifies that when
dlltool is creating the exports file it
should prepend an underscore to the names of exported
stdcall
functions. Variable names and non-stdcall function names are not modified.
This option is useful when creating GNU-compatible import libs for third
party DLLs that were built with MS-Windows tools.
"-k" 4
Item "-k" 0
"--kill-at" 4
Item "--kill-at"
Specifies that when dlltool is creating the exports file it
should not append the string @ <number>. These numbers are
called ordinal numbers and they represent another way of accessing the
function in a \s-1DLL\s0, other than by name.
"-A" 4
Item "-A" 0
"--add-stdcall-alias" 4
Item "--add-stdcall-alias"
Specifies that when dlltool is creating the exports file it
should add aliases for stdcall symbols without @ <number>
in addition to the symbols with @ <number>.
"-p" 4
Item "-p" 0
"--ext-prefix-alias prefix" 4
Item "--ext-prefix-alias prefix"
Causes dlltool to create external aliases for all \s-1DLL\s0
imports with the specified prefix. The aliases are created for both
external and import symbols with no leading underscore.
"-x" 4
Item "-x" 0
"--no-idata4" 4
Item "--no-idata4"
Specifies that when dlltool is creating the exports and library
files it should omit the \*(C`.idata4\*(C' section. This is for compatibility
with certain operating systems.
"-c" 4
Item "-c" 0
"--no-idata5" 4
Item "--no-idata5"
Specifies that when dlltool is creating the exports and library
files it should omit the \*(C`.idata5\*(C' section. This is for compatibility
with certain operating systems.
"-i" 4
Item "-i" 0
"--interwork" 4
Item "--interwork"
Specifies that dlltool should mark the objects in the library
file and exports file that it produces as supporting interworking
between \s-1ARM\s0 and Thumb code.
"-n" 4
Item "-n" 0
"--nodelete" 4
Item "--nodelete"
Makes dlltool preserve the temporary assembler files it used to
create the exports file. If this option is repeated then dlltool will
also preserve the temporary object files it uses to create the library
file.
"-t prefix" 4
Item "-t prefix" 0
"--temp-prefix prefix" 4
Item "--temp-prefix prefix"
Makes dlltool use prefix when constructing the names of
temporary assembler and object files. By default, the temp file prefix
is generated from the pid.
"-v" 4
Item "-v" 0
"--verbose" 4
Item "--verbose"
Make dlltool describe what it is doing.
"-h" 4
Item "-h" 0
"--help" 4
Item "--help"
Displays a list of command line options and then exits.
"-V" 4
Item "-V" 0
"--version" 4
Item "--version"
Displays dlltool's version number and then exits.
"@file" 4
Item "@file" Read command-line options from
file. The options read are
inserted in place of the original @
file option. If
file
does not exist, or cannot be read, then the option will be treated
literally, and not removed.
.Sp
Options in
file are separated by whitespace. A whitespace
character may be included in an option by surrounding the entire
option in either single or double quotes. Any character (including a
backslash) may be included by prefixing the character to be included
with a backslash. The
file may itself contain additional
@
file options; any such options will be processed recursively.
"SEE ALSO"
Header "SEE ALSO" The Info pages for
binutils.
"COPYRIGHT"
Header "COPYRIGHT" Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".