Andreas Mohr wrote:
Why not provide an strace/ltrace trace of that SEGV?
ltrace fails with this $ltrace /usr/local/bin/wine ntoskrnl ltrace: dict.c:117: dict_apply_to_all: Assertion `d' failed. Aborted strace output is attached (It's bziped because it was over 200k uncompressed).
I'm really stuck because of this and can't get on with safedisc support.
Doh! Hopefully my suggestion will provide more clues.
Well, I ran winegcc manually with the -v option, and found that normally programs build something with spec in the name anyway, so I changed the extension of my spec to .sspec and got the attached ntoskrnl.sspec.c file, unfortunately the build fails with make: Circular ntoskrnl.sspec.c <- ntoskrnl.sspec dependency dropped. make: Nothing to be done for `all'. so without changing the makefile I renamed the file to .spec again and got this
[ivan@localhost ntoskrnl]$ make make: Circular ntoskrnl.sspec.c <- ntoskrnl.sspec dependency dropped. gcc -g -O2 ntoskrnl.sspec.c -o ntoskrnl.sspec /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/../../../crt1.o(.text+0x18): In function `_start': ../sysdeps/i386/elf/start.S:98: undefined reference to `main' /home/ivan/tmp/ccZ0Wy9e.o(.text+0x10210): In function `__wine_dll_main': /home/ivan/Development/Wine/CVS/wine/build/programs/ntoskrnl/ntoskrnl.sspec.c:326: undefined reference to `__wine_main_environ' /home/ivan/tmp/ccZ0Wy9e.o(.text+0x10216):/home/ivan/Development/Wine/CVS/wine/build/programs/ntoskrnl/ntoskrnl.sspec.c:326: undefined reference to `__wine_main_argv' /home/ivan/tmp/ccZ0Wy9e.o(.text+0x1021c):/home/ivan/Development/Wine/CVS/wine/build/programs/ntoskrnl/ntoskrnl.sspec.c:326: undefined reference to `__wine_main_argc' /home/ivan/tmp/ccZ0Wy9e.o(.text+0x1025b): In function `__wine_spec_init': /home/ivan/Development/Wine/CVS/wine/build/programs/ntoskrnl/ntoskrnl.sspec.c:415: undefined reference to `__wine_dll_register' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x2c): In function `__wine_spec_exports_funcs': : undefined reference to `IoCreateDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x30): In function `__wine_spec_exports_funcs': : undefined reference to `IoCreateSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x34): In function `__wine_spec_exports_funcs': : undefined reference to `IoDeleteDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x38): In function `__wine_spec_exports_funcs': : undefined reference to `IoDeleteSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x3c): In function `__wine_spec_exports_funcs': : undefined reference to `IofCompleteRequest' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x40): In function `__wine_spec_exports_funcs': : undefined reference to `KeTickCount' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x44): In function `__wine_spec_exports_funcs': : undefined reference to `NtBuildNumber' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x48): In function `__wine_spec_exports_funcs': : undefined reference to `PsGetVersion' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x114): In function `__wine_spec_forwards': : undefined reference to `IoCreateDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x124): In function `__wine_spec_forwards': : undefined reference to `IoCreateSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x134): In function `__wine_spec_forwards': : undefined reference to `IoDeleteDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x144): In function `__wine_spec_forwards': : undefined reference to `IoDeleteSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x154): In function `__wine_spec_forwards': : undefined reference to `IofCompleteRequest' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x184): In function `__wine_spec_forwards': : undefined reference to `PsGetVersion' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x10d): In function `__wine_spec_forwards': : undefined reference to `IoCreateDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x11d): In function `__wine_spec_forwards': : undefined reference to `IoCreateSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x12d): In function `__wine_spec_forwards': : undefined reference to `IoDeleteDevice' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x13d): In function `__wine_spec_forwards': : undefined reference to `IoDeleteSymbolicLink' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x14d): In function `__wine_spec_forwards': : undefined reference to `IofCompleteRequest' /home/ivan/tmp/ccZ0Wy9e.o(.data+0x17d): In function `__wine_spec_forwards': : undefined reference to `PsGetVersion' collect2: ld returned 1 exit status make: *** [ntoskrnl.sspec] Error 1 [ivan@localhost ntoskrnl]$
the program has a WinMain() and not a main(), all the exported functions are in the source, so I'm not sure about the reason for these errors. What I now think is that programs probably have some default spec that's built on the fly for them, and this is interfering with my spec. This is a real shame because ntoskrnl can actually run safedisc ATM, but it crashes when Secdrv.sys can't call the ntoskrnl functions it imports. The file I did build with a .spec file and that segfaults is at http://spazioinwind.libero.it/nonsolomicrosoft/public/spec/ntoskrnl.exe.so
Ivan.