[Openmcl-devel] question about"linker triiicks"and"VirtualProtect spjump"error under Wine

dto at blocky.io dto at blocky.io
Mon Jul 22 12:21:15 PDT 2013


 Just to clarify, are your statements about 64-bit or 32-bit? I'm running with 32-bit CCL and wine.


-----Original Message-----
From: Gary Byers [mailto:gb at clozure.com]
Sent: Monday, July 22, 2013 12:35 PM
To: dto at blocky.io
Cc: openmcl-devel at clozure.com
Subject: Re: [Openmcl-devel] question about "linker tricks" and "VirtualProtect spjump" error under Wine

The linker tricks in question are: - passing the --image-base 0x10000 argument to ld.exe in ccl/lisp-kernel/win64/Makefile - telling ld.exe to use a linker script ("pei-x86-64.x") - in that linker script, reserving another 64K bytes between the (page-aligned) end of the executable file's headers and the start of its acual code,The intent is that the memory between #x11000 and #x21000 is mapped(readonly) and otherwise unused. We can achieve this effect in otherways on other platforms. remap_spjump() tries to write-enable a pagein this memory region (IIRC, at #x14000) so that something else canbe copied to that fixed address, and that fails under WINE. I'd guessthat the failure is caused by WINE's failure to have mapped the executableat the specifed image-base address in the first place, but that's justa guess.On Mon, 22 Jul 2013, dto at blocky.io wrote:> Greetings, Clozure CL community.> > I have a question about the "linker tricks" described near remap_spjump() in> the CCL source:> ??> ? ?http://svn.clozure.com/publicsvn/openmcl/trunk/source/lisp-kernel/pmcl-kern> el.c> > When attempting to run the Windows version of CCL under Wine 1.6, the> following error message results:> ?> ??? VirtualProtect spjump: 0x57 Invalid parameter.> > A Wine developer took a look at the source in question, and said that it> appeared that a VM feature that CCL is> using for memory reservation, isn't supported by Wine. He also said that if> I could get a clarification from CCL developers> on what the "linker tricks" are, I might be able to modify Wine so that it> works, without modifying CCL at all.> > Why am I doing this? I used to use SBCL.EXE with Wine in order to build> Windows EXE's of my games without> having Windows. But unfortunately, the resulting EXE won't work on some> 64-bit versions of Windows due to> an existing incompatibility in SBCL. I use CCL for the Windows versions now,> but I have to use a separate Windows> machine that I don't always have access to.> > For the curious, my current GPL game is here: http://blocky.io/2x0ng.html> And I'd like to thank you for helping me a few times on the IRC channel,> when I first started building> the game with CCL.> > So, I hope that with a little information, I could work with Wine developers> to make things compatible.> I would greatly appreciate any information you could offer as to what> remap_spjump() is doing.> > Thank you.> > --David> > > >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130722/42e6c63d/attachment.htm>


More information about the Openmcl-devel mailing list