A .def file contains any number of the following commands:
NAME
name [ ,
base ]
.exe
.
LIBRARY
name [ ,
base ]
.dll
.
Note: If you want to use LIBRARY as name then you need to quote. Otherwise
this will fail due a necessary hack for libtool (see PR binutils/13710 for more
details).
EXPORTS ( ( (
name1 [ =
name2 ] ) | (
name1 =
module-name .
external-name ) ) [ ==
its_name ]
[
integer ] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *
EXPORTS
has to be the last command in .def file, as keywords
are treated - beside LIBRARY
- as simple name-identifiers.
If you want to use LIBRARY as name then you need to quote it.
IMPORTS ( (
internal-name =
module-name .
integer ) | [
internal-name = ]
module-name .
external-name ) [ == )
its_name ] *
IMPORTS
has to be the last command in .def file, as keywords
are treated - beside LIBRARY
- as simple name-identifiers.
If you want to use LIBRARY as name then you need to quote it.
DESCRIPTION
string.rdata
section.
STACKSIZE
number-reserve [,
number-commit ]
HEAPSIZE
number-reserve [,
number-commit ]
--stack
or --heap
number-reserve,number-commit in the output .drectve
section. The linker will see this and act upon it.
CODE
attr +
DATA
attr +
SECTIONS (
section-name attr + ) *
--attr
section-name attr in the output
.drectve
section, where attr is one of READ
,
WRITE
, EXECUTE
or SHARED
. The linker will see
this and act upon it.