• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/binutils.html/
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-2013 Free Software Foundation, Inc.
12
13Permission is granted to copy, distribute and/or modify this document
14under the terms of the GNU Free Documentation License, Version 1.3
15or any later version published by the Free Software Foundation;
16with no Invariant Sections, with no Front-Cover Texts, and with no
17Back-Cover Texts.  A copy of the license is included in the
18section entitled ``GNU Free Documentation License''.
19
20-->
21<meta http-equiv="Content-Style-Type" content="text/css">
22<style type="text/css"><!--
23  pre.display { font-family:inherit }
24  pre.format  { font-family:inherit }
25  pre.smalldisplay { font-family:inherit; font-size:smaller }
26  pre.smallformat  { font-family:inherit; font-size:smaller }
27  pre.smallexample { font-size:smaller }
28  pre.smalllisp    { font-size:smaller }
29  span.sc    { font-variant:small-caps }
30  span.roman { font-family:serif; font-weight:normal; } 
31  span.sansserif { font-family:sans-serif; font-weight:normal; } 
32--></style>
33<link rel="stylesheet" type="text/css" href="../cs.css">
34</head>
35<body>
36<div class="node">
37<a name="def-file-format"></a>
38<p>
39Up:&nbsp;<a rel="up" accesskey="u" href="dlltool.html#dlltool">dlltool</a>
40<hr>
41</div>
42
43<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>
44
45<p>A <samp><span class="file">.def</span></samp> file contains any number of the following commands:
46
47     <dl>
48<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>.
49
50     <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>. 
51Note: If you want to use LIBRARY as name then you need to quote.  Otherwise
52this will fail due a necessary hack for libtool (see PR binutils/13710 for more
53details).
54
55     <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
56ordinal number <var>integer</var>, or declares <var>name1</var> as an alias
57(forward) of the function <var>external-name</var> in the DLL. 
58If <var>its_name</var> is specified, this name is used as string in export table. 
59<var>module-name</var>. 
60Note: The <code>EXPORTS</code> has to be the last command in .def file, as keywords
61are treated - beside <code>LIBRARY</code> - as simple name-identifiers. 
62If you want to use LIBRARY as name then you need to quote it.
63
64     <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
65ordinal number is <var>integer</var> is to be imported from the file
66<var>module-name</var>.  If <var>internal-name</var> is specified then this is
67the name that the imported function will be referred to in the body of
68the DLL. 
69If <var>its_name</var> is specified, this name is used as string in import table. 
70Note: The <code>IMPORTS</code> has to be the last command in .def file, as keywords
71are treated - beside <code>LIBRARY</code> - as simple name-identifiers. 
72If you want to use LIBRARY as name then you need to quote it.
73
74     <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
75<code>.rdata</code> section.
76
77     <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>
78<var>number-reserve</var>,<var>number-commit</var> in the output <code>.drectve</code>
79section.  The linker will see this and act upon it.
80
81     <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
82<code>.drectve</code> section, where <var>attr</var> is one of <code>READ</code>,
83<code>WRITE</code>, <code>EXECUTE</code> or <code>SHARED</code>.  The linker will see
84this and act upon it.
85
86   </dl>
87
88   </body></html>
89
90