Chris McKillroy asked:
I tried to use a DLL injection ... (http://www.madshi.net/madCodeHookDescription.htm) Under Solaris10 (wine version 0.9.49) the child process regularly crashed... [because] kernel32.dll.so always gets loaded to a varying address by the runtime linker
Yep. Known problem with Wine.
After a posting to the Solaris Linker mailing list we got an answer (http://mail.opensolaris.org/pipermail/tools-linking/2007-November/000945.htm...) ... My question now is: How would I have to change things (makefile or whatsever) to get kernel32.dll.so linked in a way to achive that it will be loaded to address 0x7bf0000 each time under Solaris.
Good question. It's probably pretty involved; you may have to wait for an expert to try it and see what it breaks. Alexandre suggested it might not work recently (see http://bugs.winehq.org/show_bug.cgi?id=10273#c17 ), but perhaps he's being overly pessimistic.
BTW if that idea works for Solaris, it might work for Linux, too. - Dan
"Dan Kegel" dank@kegel.com writes:
Good question. It's probably pretty involved; you may have to wait for an expert to try it and see what it breaks. Alexandre suggested it might not work recently (see http://bugs.winehq.org/show_bug.cgi?id=10273#c17 ), but perhaps he's being overly pessimistic.
BTW if that idea works for Solaris, it might work for Linux, too.
It works on Linux already, we are using prelink to set the kernel32 load address. That doesn't mean you can avoid -fPIC since the address is not guaranteed to be available.