Subject: Now I know what went wrong when building dll's
From: [email-masked] ("wiljan")

13 Dec 1996 12:31:29 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Original-To: <[email-masked]>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: [email-masked]

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
"[email-masked]" with one line of text: "help".