Mail Archives: cygwin/1996/12/13/12:31:29
I now finally can build dlls the way I want them.
It turns out that I tried to link a dll without having a module
which contains the line:
asm (".section .idata$3\n" ".long 0,0,0,0,0,0,0,0");
I am linking my dll not against cygwin, but against crtdll as they do
in the minimalist gnu win32 environment.
I had no use for crt0.o so I did not include it when linking.
This causes the import table of the dll to be currupt, or simply
not finished properly.
Here some lines that are in the end of crt0.c:
#ifdef __GNUC__
/*
* This section terminates the list of imports under GCC. If you do not
* include this then you will have problems when linking with DLLs.
*/
asm (".section .idata$3\n" ".long 0,0,0,0,0,0,0,0");
#endif
This explains why one gets currupted dlls which are not loadable.
It whould be nice if one whould get a message for ld indicating that
this is the case.
I am now able to link code together using just the cygnus tools
and call the dll again from Visual Basic.
This means that NOTHING IS WRONG with LD and DLLTOOL
Thus wehn linking asure that one for your modules contains
above line.
Is this documented somewhere ???
Greetings,
Wiljan
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -