prushik on 6 Oct 2017 08:13:13 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] automatic emulation of other architectures?

Very interesting. I know I have seen that before in Kernel Kconfigs, but didn't know that's what it meant.

Sent from my Tizen device.
---- Original message ----
From: Rich Mingin (PLUG) <>
Sent: 10/06/2017 10:37:59
To: Philadelphia Linux User's Group Discussion List <>
Subject: Re: [PLUG] automatic emulation of other architectures?

Don't know who set x86_64 to be associated with qemu, but the actual mechanism is likely misc_binfmt. It's been used to auto-invoke wine for win32 binaries for many years, as an example.

On Fri, Oct 6, 2017 at 10:15 AM, prushik <> wrote:
Hey everybody,

I noticed something odd this morning. I had a C project I was working on a while ago that I wanted to pick up again. So I moved the code I had up to github and checked it out on my pinebook so that I could work on it on the go. I accidentally. included 2 compiled executables in the repo, and instead of recompiling on my pinebook, i thought i would first with test the precompiled executables.
However, pinebook is aarch64 and executables were compiled for x86_64. So i installed qemu to emulate the arch needed and tested the first executable and it worked fine.
Then, I tested the second and it also worked fine. However, the second time i forgot to invoke qemu! It looked a lot like qemu somehow still got invoked either by bash or by the kernel, but I have never heard of such a mechanism in linux before. I understand how the shebang works, but how would the os know how to invoke an emulator for another architecture?

Sent from my Tizen device.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --