⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlltool.1

📁 MinGW+MSYS必备的开发工具链
💻 1
📖 第 1 页 / 共 2 页
字号:
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" 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 C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\.    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\}.el\{\.    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..if \nF \{\.    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..hy 0.\".\" 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.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    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.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    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.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "DLLTOOL 1".TH DLLTOOL 1 "2006-08-25" "binutils-2.17.50" "GNU Development Tools".SH "NAME"dlltool \- Create files needed to build and use DLLs..SH "SYNOPSIS".IX Header "SYNOPSIS"dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR]        [\fB\-b\fR|\fB\-\-base\-file\fR \fIbase-file-name\fR]        [\fB\-e\fR|\fB\-\-output\-exp\fR \fIexports-file-name\fR]        [\fB\-z\fR|\fB\-\-output\-def\fR \fIdef-file-name\fR]        [\fB\-l\fR|\fB\-\-output\-lib\fR \fIlibrary-file-name\fR]                [\fB\-\-export\-all\-symbols\fR] [\fB\-\-no\-export\-all\-symbols\fR]        [\fB\-\-exclude\-symbols\fR \fIlist\fR]        [\fB\-\-no\-default\-excludes\fR]        [\fB\-S\fR|\fB\-\-as\fR \fIpath-to-assembler\fR] [\fB\-f\fR|\fB\-\-as\-flags\fR \fIoptions\fR]        [\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR]        [\fB\-a\fR|\fB\-\-add\-indirect\fR]        [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-\-add\-stdcall\-underscore\fR]        [\fB\-k\fR|\fB\-\-kill\-at\fR] [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR]        [\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR]        [\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-i\fR|\fB\-\-interwork\fR]        [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR]        [\fB\-v\fR|\fB\-\-verbose\fR]         [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]        [object\-file ...].SH "DESCRIPTION".IX Header "DESCRIPTION"\&\fBdlltool\fR reads its inputs, which can come from the \fB\-d\fR and\&\fB\-b\fR options as well as object files specified on the commandline.  It then processes these inputs and if the \fB\-e\fR option hasbeen specified it creates a exports file.  If the \fB\-l\fR optionhas been specified it creates a library file and if the \fB\-z\fR optionhas been specified it creates a def file.  Any or all of the \fB\-e\fR, \&\fB\-l\fR and \fB\-z\fR options can be present in one invocation of dlltool..PPWhen creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is necessaryto have three other files.  \fBdlltool\fR can help with the creation ofthese files..PPThe first file is a \fI.def\fR file which specifies which functions areexported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on.  Thisis a text file and can be created by hand, or \fBdlltool\fR can be usedto create it using the \fB\-z\fR option.  In this case \fBdlltool\fRwill scan the object files specified on its command line looking forthose functions which have been specially marked as being exported andput entries for them in the \fI.def\fR file it creates..PPIn order to mark a function as being exported from a \s-1DLL\s0, it needs tohave an \fB\-export:<name_of_function>\fR entry in the \fB.drectve\fRsection of the object file.  This can be done in C by using the\&\fIasm()\fR operator:.PP.Vb 2\&          asm (".section .drectve");  \&          asm (".ascii \e"-export:my_func\e"");.Ve.PP.Vb 1\&          int my_func (void) { ... }.Ve.PPThe second file needed for \s-1DLL\s0 creation is an exports file.  This fileis linked with the object files that make up the body of the \s-1DLL\s0 and ithandles the interface between the \s-1DLL\s0 and the outside world.  This is abinary file and it can be created by giving the \fB\-e\fR option to\&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file. .PPThe third file needed for \s-1DLL\s0 creation is the library file that programswill link with in order to access the functions in the \s-1DLL\s0.  This filecan be created by giving the \fB\-l\fR option to dlltool when itis creating or reading in a \fI.def\fR file..PP\&\fBdlltool\fR builds the library file by hand, but it builds theexports file by creating temporary files containing assembler statementsand then assembling these.  The \fB\-S\fR command line option can beused to specify the path to the assembler that dlltool will use,and the \fB\-f\fR option can be used to pass specific flags to thatassembler.  The \fB\-n\fR can be used to prevent dlltool from deletingthese temporary assembler files when it is done, and if \fB\-n\fR isspecified twice then this will prevent dlltool from deleting thetemporary object files it used to build the library..PPHere is an example of creating a \s-1DLL\s0 from a source file \fBdll.c\fR andalso creating a program (from an object file called \fBprogram.o\fR)that uses that \s-1DLL:\s0.PP.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.SH "OPTIONS".IX Header "OPTIONS"The command line options have the following meanings:.IP "\fB\-d\fR \fIfilename\fR" 4.IX Item "-d filename".PD 0.IP "\fB\-\-input\-def\fR \fIfilename\fR" 4.IX Item "--input-def filename".PDSpecifies the name of a \fI.def\fR file to be read in and processed..IP "\fB\-b\fR \fIfilename\fR" 4.IX Item "-b filename".PD 0.IP "\fB\-\-base\-file\fR \fIfilename\fR" 4.IX Item "--base-file filename".PDSpecifies the name of a base file to be read in and processed.  Thecontents of this file will be added to the relocation section in the

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -