Index: loader/win32.c =================================================================== --- loader/win32.c.orig 2007-02-15 09:42:47.000000000 -0800 +++ loader/win32.c 2007-02-15 09:44:34.000000000 -0800 @@ -3542,6 +3542,7 @@ i2, p1, i3, i4, i5); if((!cs1) || (strlen(cs1)<2))return -1; + if(strncmp(cs1, "\\\\.\\", 4) == 0) return -1; //Hack for PECompact2 #ifdef QTX if(strstr(cs1, "QuickTime.qts")) { Index: loader/pe_image.c =================================================================== --- loader/pe_image.c.orig 2007-02-15 09:42:47.000000000 -0800 +++ loader/pe_image.c 2007-02-15 09:43:25.000000000 -0800 @@ -910,6 +910,22 @@ #endif } +#include +static void wine_sighandler(int x) +{ + __asm__ ("movl 68(%esp), %eax\n\t" + "pushl %eax\n\t" + "subl $12, %esp\n\t" + "movl %esp, %eax\n\t" + "pushl %eax\n\t" + "pushl %eax\n\t" + "movl %fs:0x0, %eax\n\t" + "movl 4(%eax),%eax\n\t" + "call *%eax\n\t" + "movl %ebp, %esp\n\t"); + return; +} + /* Called if the library is loaded or freed. * NOTE: if a thread attaches a DLL, the current thread will only do * DLL_PROCESS_ATTACH. Only new created threads do DLL_THREAD_ATTACH @@ -951,7 +967,9 @@ } TRACE("for %s\n", wm->filename); extend_stack_for_dll_alloca(); + void *oldsig = signal(SIGSEGV, wine_sighandler); retv = entry( wm->module, type, lpReserved ); + signal(SIGSEGV, oldsig); } return retv;