X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: "Avi Cohen Stuart" Subject: Oxc0000005 error during application loading. Date: Mon, 14 Aug 2006 14:40:41 +0200 Lines: 75 Message-ID: Reply-To: "Avi Cohen Stuart" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, Please let me know if this is the correct newsgroup. I'm trying to get openmotif to run under cygwin. I know that I'm not supposed to do that but, who knows, maybe they change the license one of these days :-) The test I'm using is the hello.c from chapter 2 of the motif examples. During the link I get these messages, I don't know if they are relevant. gcc -Wl,--script,/usr/lib/ldscripts/i386pe.x-no-rdata -ggdb3 -O2 -fno-strength-reduce -Wall -Wpointer-arith -I/usr/X11R6/include -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE -D_X86_ -D__CYGWIN__ -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DFD_SETSIZE=256 -DXResExtension -DFUNCPROTO=15 -DNARROWPROTO hello.c -L/usr/X11R6/lib -lXm -lXt -lSM -lICE -lX11 -o hello hello.c:8: warning: return type defaults to `int' hello.c: In function `main': hello.c:30: warning: control reaches end of non-void function Info: resolving _sessionShellWidgetClass by linking to __imp__sessionShellWidgetClass (auto-import) Info: resolving __XmStrings by linking to __imp___XmStrings (auto-import) The problem I'm having is that any app linked with the new shared library I'm getting an error 0xc0000005 during the loading of the shared libraries, before I even enter main(). gdb reports the following: Program received signal SIGSEGV, Segmentation fault. Program received signal SIGSEGV, Segmentation fault. Program received signal SIGSEGV, Segmentation fault. Program exited with code 030000000005. You can't do that without a process to debug. (gdb) When using windbg it reports a access violation here, apperantly during the resolving of shared libaries. # ChildEBP RetAddr 00 0022f6bc 7c91d690 ntdll!LdrpSnapThunk+0xe1 01 0022f740 7c91d9cb ntdll!LdrpSnapIAT+0x20e 02 0022f76c 7c91d944 ntdll!LdrpHandleOneOldFormatImportDescriptor+0xcc 03 0022f784 7c91c8a6 ntdll!LdrpHandleOldFormatImportDescriptors+0x1f 04 0022f800 7c91de96 ntdll!LdrpWalkImportDescriptor+0x19e 05 0022fa50 7c91d99d ntdll!LdrpLoadImportModule+0x1c8 06 0022fa80 7c91d944 ntdll!LdrpHandleOneOldFormatImportDescriptor+0x5e 07 0022fa98 7c91c8a6 ntdll!LdrpHandleOldFormatImportDescriptors+0x1f 08 0022fb14 7c922370 ntdll!LdrpWalkImportDescriptor+0x19e 09 0022fc94 7c921639 ntdll!LdrpInitializeProcess+0xe02 0a 0022fd1c 7c90eac7 ntdll!_LdrpInitialize+0x183 0b 00000000 00000000 ntdll!KiUserApcDispatcher+0x7 I'm using the following command to link the shared libray for Xm: gcc -shared -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--exclude-libs,ALL -Wl,--out-implib,.libs/libXm.dll.a .libs/*.o -L/usr/X11R6/lib -lXmu -lXt -lXext -lXp -lX11 -lSM -lICE -o .libs/cygXm-4.dll when doing an nm on the created shlib I see a lot of .bss and .idata$3 (and .rdata) entries that I don't see on other libs (like cygX11.dll) What I am I doing wrong? Or where should I look? (Besides compiling openmotif on cygwin :-) ) Avi. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/