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) <plug@frags.us>
Sent: 10/06/2017 10:37:59
To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
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.

https://en.wikipedia.org/wiki/Binfmt_misc

On Fri, Oct 6, 2017 at 10:15 AM, prushik <prushik@gmail.com> 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         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug