155
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 13 Jan 2025
155 points (91.9% liked)
Linux
49035 readers
771 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
It would be great if there were a way to translate x86 binaries for ARM without emulation. Has Valve found some way to do that? From a bit of searching I see they've been testing games on ARM, and that testing involves a version of Proton/Wine that runs on ARM. But it looks to me like they're testing with ARM binaries for those games?
I'm as enthusiastic as anyone about more Linux usage, and I agree that Linux support for ARM is a good selling point. But the reason Linux works so well on ARM is that we use all this open-source software that anyone can compile for ARM. I don't think it's honest to point to closed-source software that we can't recompile, and imply that it will work better on Linux because other software runs natively on ARM on Linux.
That's called "emulation".
If it coukd be baked before rather than at run time it feels like there might be some nuance there
It's a very difficult problem to solve.
Different architectures are more than just translating op codes. They have different ways to address memory, different types, sizes and number of registers. Compiled binaries use offsets within the code to jump, loop, etc. which all changes when you start changing instructions. It's much easier to emulate the platform at runtime.
No doubt. Software emulation of different arches is still magic to me. Being able to run qemu to run just one program on the CLI as an arm bin was so neat
It requires a near obsessive understanding of the architecture being emulated, but generally the process is "relatively straightforward" (though not necessarily "easy"). A CPU is a relatively simple device compared to the software built on it. Your basic steps are:
Throw that in a loop and voilà! You have an emulator. Granted I've handwaved over a lot of complexity (I don't mean to trivialize the effort)...
To translate a binary is very different. Compilers optimize output to behave in a specific way for the target CPU that simply may not work on the new CPU. What do you do, for example, if the code was compiled for a platform that had 12 registers but the new one only has 6? You'd need to re-write the logic to work with fewer registers. That's difficult to do in a way that is generic for any program. An emulator can just present the program with the 12 registers it expects (emulated in memory at the expense of performance).