Subject: Re: dll building : segmentation faults
From: [email-masked] ("Philippe GIACINTI")

7 Aug 1997 12:09:07 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
In-Reply-To: "Andreas Jellinghaus (bei rf)" <[email-masked]>
        "dll building : segmentation faults" (Aug  6,  1:04pm)
X-Face: ^cJc2\tiS@#Ja@7laz+N]T)kL{-Kay)Oz"?}p[wuY#}}dO"enP!QVO{,}&4P2V[hEfJD]9&
              E1ou~|tY/|9d&7c,7yf>7n: Zj8FD(LtPXWHzy^OJIDi/~O~R]3x/5}"7P;|,*%f:3Z!>h8Ff/&)g?/
              }$RXQ
X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail)
Original-To: [email-masked]
Original-Cc: [email-masked]
Original-Sender: [email-masked]

Hi,

1) The fixup asm(".section .idata$3 ...") is here to terminate the Import
Directory Table in which each element is 5x32 bits long and which should be
terminated with a NULL element.
So I think the correct fixup should be
	asm(".section .idata$3\n" ".long 0,0,0,0,0"); only 5 zeros ...

2) May be can you try to put the fixup at end of your file, I had problems
which were solved that way ... ( don't ask me why )

#include <windows.h>
/* asm(".section .idata$3\n" ".long 0,0,0,0,0,0,0,0"); not here */
WINAPI dll_entry(int a,int b,int c) { return 1; }
void dummy() { return ; }
/* put it here */
asm(".section .idata$3\n" ".long 0,0,0,0,0");

3) I had also some troubles with strange relocations that I have solved in
adding a third link pass ...

Hope this helps,

Best regards.

-- 

 ==========================================================================
|                         Philippe GIACINTI                                |
|                                                                          |
| DALiM GmbH R&D                                email:  [email-masked]      |
| Daimler Strasse 2,                            tel:    +49.7851.9196-28   |
| D-77694 Kehl-Sundheim Germany                 fax:    +49.7851.73576	   |
|                                                                          |
 ==========================================================================
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".