aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-19 13:11:30 +0000
committerNick Clifton <nickc@redhat.com>1999-08-19 13:11:30 +0000
commitaff05906d21b6db722b9535e54be1d61b96da0ae (patch)
treed637dfab6ed3cebf61052f88e00c45698b725784
parent69e70d305635c2caacc43c2744b455ca84f8e322 (diff)
downloadgdb-aff05906d21b6db722b9535e54be1d61b96da0ae.zip
gdb-aff05906d21b6db722b9535e54be1d61b96da0ae.tar.gz
gdb-aff05906d21b6db722b9535e54be1d61b96da0ae.tar.bz2
extend comment.
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/dlltool.c29
2 files changed, 31 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index bfc6620..1103281 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+1999-08-19 Nick Clifton <nickc@cygnus.com>
+
+ * dlltool.c: Added more examples to the comment at the start.
+
1999-08-18 Nick Clifton <nickc@cygnus.com>
* dlltool.c (make_head): Only emit interworking directive if
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index dc91dba..82576ff 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -158,14 +158,39 @@
# file (thedll.o) and an imports file (thedll.a).
# (You may have to use -S to tell dlltool where to find the assembler).
- ./dlltool --def thedll.def --output-exp thedll.o --output-lib thedll.a
+ dlltool --def thedll.def --output-exp thedll.o --output-lib thedll.a
- # Build the dll with the library with file1.o, file2.o and the export table
+ # Build the dll with the library and the export table
+
ld -o thedll.dll thedll.o thedll.in
# Link the executable with the import library
+
gcc -o themain.exe themain.o thedll.a
+ This example can be extended if relocations are needed in the DLL:
+
+ # Compile up the parts of the dll and the program
+
+ gcc -c file1.c file2.c themain.c
+
+ # Run this tool over the DLL's .def file and generate an imports file.
+
+ dlltool --def thedll.def --output-lib thedll.lib
+
+ # Link the executable with the import library and generate a base file
+ # at the same time
+
+ gcc -o themain.exe themain.o thedll.lib -Wl,--base-file -Wl,themain.base
+
+ # Run this tool over the DLL's .def file and generate an exports file
+ # which includes the relocations from the base file.
+
+ dlltool --def thedll.def --base-file themain.base --output-exp thedll.exp
+
+ # Build the dll with file1.o, file2.o and the export table
+
+ ld -o thedll.dll thedll.exp file1.o file2.o
*/
/* .idata section description