5 ms·
Every windows program has to (eventually) call a Linux library, since Wine emulates Windows on top of Linux. Take for example "decoding an MP3 frame". A 32bit
by dark-star 4y ago
Every windows program has to (eventually) call a Linux library, since Wine emulates Windows on top of Linux.
Take for example "decoding an MP3 frame". A 32bit program calls a Windows API to decode an MP3 frame, that gets intercepted by Wine and forwarded to libmpg123. Since it's a 32bit program, you need (or needed, until now) the 32bit mpg123 library to handle the request.
So it's not a matter of a Windows program actually calling a Linux library, but rather Wine forwarding the function call
Forwarding 32bit calls to 64bit functions sounds simple, but it is incredibly complex. It might be simple for a function that only takes an int as argument, but on Windows, functions often take pointers to Windows structures, and those structures are often different between 32 and 64 bit. You have to translate them on-the-fly....
- tarotuser 4y agoWine emulates Windows APIs. You would need something like qemu to do arm->x86-64 to do CPU emulation and then use WINE to run Windows programs on a Raspberry Pi.
- skrowl 4y agohttps://github.com/ptitSeb/box64 https://github.com/ptitSeb/box64 can do it a little lighter than a full qemu VM
- dark-star 4y agoI think your comment went to the wrong post. I know how Wine works, and in my example I explicitly said "API". And I don't think I ever said something about ARM or the RaspberryPi? My point was to explicitly make it simple to understand, as most people don't know what thunks are, or trampolines, or the differences between protected mode and long mode. And yes, I called Wine an emulator, because that's what it is...
- tomkarho 4y ago> Every windows program has to (eventually) call a Linux library, since Wine emulates Windows on top of Linux. Obligatory reminder: Wine Is Not Emulator.
- chungy 4y agoThe word is overloaded and the implication that emulator means ISA emulation is why Wine for a time adopted that expansion. It still very much emulates the Windows ABI and API. It's original name was "Windows Emulator", even, hence the abbreviation Wine.