Malware on Wine review

Ben Klein shacklein at gmail.com
Wed Feb 25 19:37:45 CST 2009


2009/2/26 King InuYasha <ngompa13 at gmail.com>:
> On Wed, Feb 25, 2009 at 6:50 PM, Ben Klein <shacklein at gmail.com> wrote:
>>
>> 2009/2/26 King InuYasha <ngompa13 at gmail.com>:
>> > Now that Nautilus has the desktop file requiring execute bit, I have a
>> > question for all of you to consider. Do JAR files require the +x bit to
>> > load
>> > them, or are they treated like associated files and run through the
>> > interpreter? Really, Windows apps on Linux is basically the same
>> > situation
>> > as Java applications run through the bytecode interpreter.
>>
>> You just answered your own question. Java is interpreted and has to be
>> passed through a compatible byte-code interpreter. Wine does not
>> interpret PE files in this fashion, and cannot because it is not and
>> does not have a CPU emulator. So a JAR file should run if passed as an
>> argument to the interpreter, just like what happens with the scripting
>> languages that open the file for reading instead of trying to fork and
>> execute.
>>
>
> But, doesn't Wine translate Win32 calls into its equivalent calls for Linux?
> GDI to X11, D3D to OpenGL, etc.?
> That sounds like an interpreter to me. It may not necessarily a bytecode
> interpreter, but it still interprets the Win32 API and translates it to the
> appropriate UNIX APIs. Isn't this what makes Wine not an emulator?

It's a compatibility layer. It doesn't actually interpret individual
instructions. As described earlier, Wine sets up an environment
suitable for the Windows apps to run in (which is primarily
*implementations* of win32 calls that "translate" in one way or
another into *nix/X11 calls) and then just lets it do its thing.
Unlike in Java, scripting languages etc, Wine does not read in the
application one instruction at a time and do a mapping/translation
into executable functionality. The assembly components (such as
mathematical operations) run as if it was a native application.



More information about the wine-devel mailing list