1<html lang="en"> 2<head> 3<title>def file format - GNU Binary Utilities</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="GNU Binary Utilities"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="dlltool.html#dlltool" title="dlltool"> 9<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 10<!-- 11Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 122000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 13Free Software Foundation, Inc. 14 15Permission is granted to copy, distribute and/or modify this document 16under the terms of the GNU Free Documentation License, Version 1.3 17or any later version published by the Free Software Foundation; 18with no Invariant Sections, with no Front-Cover Texts, and with no 19Back-Cover Texts. A copy of the license is included in the 20section entitled ``GNU Free Documentation License''. 21 22--> 23<meta http-equiv="Content-Style-Type" content="text/css"> 24<style type="text/css"><!-- 25 pre.display { font-family:inherit } 26 pre.format { font-family:inherit } 27 pre.smalldisplay { font-family:inherit; font-size:smaller } 28 pre.smallformat { font-family:inherit; font-size:smaller } 29 pre.smallexample { font-size:smaller } 30 pre.smalllisp { font-size:smaller } 31 span.sc { font-variant:small-caps } 32 span.roman { font-family:serif; font-weight:normal; } 33 span.sansserif { font-family:sans-serif; font-weight:normal; } 34--></style> 35<link rel="stylesheet" type="text/css" href="../cs.css"> 36</head> 37<body> 38<div class="node"> 39<a name="def-file-format"></a> 40<p> 41Up: <a rel="up" accesskey="u" href="dlltool.html#dlltool">dlltool</a> 42<hr> 43</div> 44 45<h3 class="section">14.1 The format of the <samp><span class="command">dlltool</span></samp> <samp><span class="file">.def</span></samp> file</h3> 46 47<p>A <samp><span class="file">.def</span></samp> file contains any number of the following commands: 48 49 <dl> 50<dt><code>NAME</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code><dd>The result is going to be named <var>name</var><code>.exe</code>. 51 52 <br><dt><code>LIBRARY</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code><dd>The result is going to be named <var>name</var><code>.dll</code>. 53 54 <br><dt><code>EXPORTS ( ( (</code> <var>name1</var> <code>[ = </code> <var>name2</var> <code>] ) | ( </code> <var>name1</var> <code>=</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) ) [ == </code> <var>its_name</var> <code>]</code><br><dt><code>[</code> <var>integer</var> <code>] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *</code><dd>Declares <var>name1</var> as an exported symbol from the DLL, with optional 55ordinal number <var>integer</var>, or declares <var>name1</var> as an alias 56(forward) of the function <var>external-name</var> in the DLL. 57If <var>its_name</var> is specified, this name is used as string in export table. 58<var>module-name</var>. 59 60 <br><dt><code>IMPORTS ( (</code> <var>internal-name</var> <code>=</code> <var>module-name</var> <code>.</code> <var>integer</var> <code>) | [</code> <var>internal-name</var> <code>= ]</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) [ == ) </code><var>its_name</var><code> ] *</code><dd>Declares that <var>external-name</var> or the exported function whose 61ordinal number is <var>integer</var> is to be imported from the file 62<var>module-name</var>. If <var>internal-name</var> is specified then this is 63the name that the imported function will be referred to in the body of 64the DLL. 65If <var>its_name</var> is specified, this name is used as string in import table. 66 67 <br><dt><code>DESCRIPTION</code> <var>string</var><dd>Puts <var>string</var> into the output <samp><span class="file">.exp</span></samp> file in the 68<code>.rdata</code> section. 69 70 <br><dt><code>STACKSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code><br><dt><code>HEAPSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code><dd>Generates <code>--stack</code> or <code>--heap</code> 71<var>number-reserve</var>,<var>number-commit</var> in the output <code>.drectve</code> 72section. The linker will see this and act upon it. 73 74 <br><dt><code>CODE</code> <var>attr</var> <code>+</code><br><dt><code>DATA</code> <var>attr</var> <code>+</code><br><dt><code>SECTIONS (</code> <var>section-name</var> <var>attr</var><code> + ) *</code><dd>Generates <code>--attr</code> <var>section-name</var> <var>attr</var> in the output 75<code>.drectve</code> section, where <var>attr</var> is one of <code>READ</code>, 76<code>WRITE</code>, <code>EXECUTE</code> or <code>SHARED</code>. The linker will see 77this and act upon it. 78 79 </dl> 80 81 </body></html> 82 83