This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dll building : segmentation faults


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:  giac@dalim.de      |
| 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
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]