delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/06/12:41:49

From: jelling AT iitb DOT fhg DOT de ("Andreas Jellinghaus (bei rf)")
Subject: dll building : segmentation faults
6 Aug 1997 12:41:49 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <19970806130447.28713.cygnus.gnu-win32@bsilx1.iitb.fhg.de>
Reply-To: aj AT dungeon DOT inka DOT de
Mime-Version: 1.0
X-ENV: (mailgw2.fhg.de) jelling AT bsilx1 DOT iitb DOT fhg DOT de -> gnu-win32 AT cygnus DOT com DOT VIA-SMTP
Original-To: gnu-win32 AT cygnus DOT com
X-Mailer: Mutt 0.75
Original-Sender: owner-gnu-win32 AT cygnus DOT com

gcc    -c dllentry.c -o dllentry.o
ld -s --base-file my_dll.base --entry _dll_entry AT 12 \
        --dll --output my_dll.jnk dllentry.o 
dlltool --base-file my_dll.base --def my_dll.def --dllname my_dll.dll \
        --output-exp my_dll.exp --output-lib my_dll.a 
ld -s --dll --entry _dll_entry AT 12 --output my_dll.dll my_dll.exp  dllentry.o 

working dllentry.c :
#include <windows.h>
asm(".section .idata$3\n" ".long 0,0,0,0,0,0,0,0");
WINAPI dll_entry(int a,int b,int c) { return 1; }
char* dummy() { return ""; }

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

(also not working int dummy, int* dummy, ...).  any hints ? i'm using gnu win
32, beta 18 (i tried this on winnt and linux with the same result).

andreas

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019