- claim to run unmodified Linux executable like OSv does
gVisor can run the C application without recompiling, but application only can run on OSv with recompiling.
On Thu, Sep 20, 2018 at 9:29 AM, Qixuan Wu <wuqi...@gmail.com> wrote:
在 2018年9月19日星期三 UTC+8下午9:25:15,Pekka Enberg写道:On Wed, Sep 19, 2018 at 4:18 AM, Qixuan Wu <wuqi...@gmail.com> wrote:
- claim to run unmodified Linux executable like OSv does
gVisor can run the C application without recompiling, but application only can run on OSv with recompiling.OSv is quite capable of running unmodified Linux executables, as long as they use the subset of Linux ABI OSv actually supports (IOW, no fork(), for example).But application need to be recompiled on OSv, it's better to support to be without recompiling.No, OSv does _not_ require applications to be recompiled. What makes you think it does?OSv implements a subset of the Linux system call ABI and has a built-in ELF loader and linker. This allows OSv to run *unmodified* Linux binaries.
Of course, if your application uses parts of the Linux ABI that are not supported, such as fork, they will not run very long. But OSv is capable of running unmodified Linux binaries for applications that restrict themselves to the subset of the ABI that OSv supports.- Pekka
--
You received this message because you are subscribed to the Google Groups "OSv Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think Qixuan may be referring to the fact that OSv today can only run position-independent executables (shared objects and PIE), and nor "regular" position-dependent executables,which causes us in many applications in apps/ to modify the Makefile to add "-shared", "-pie", or something like that, requiring recompilation.
On Thu, Sep 20, 2018 at 10:06 AM, Pekka Enberg <pen...@scylladb.com> wrote:On Thu, Sep 20, 2018 at 9:29 AM, Qixuan Wu <wuqi...@gmail.com> wrote:
在 2018年9月19日星期三 UTC+8下午9:25:15,Pekka Enberg写道:On Wed, Sep 19, 2018 at 4:18 AM, Qixuan Wu <wuqi...@gmail.com> wrote:
- claim to run unmodified Linux executable like OSv does
gVisor can run the C application without recompiling, but application only can run on OSv with recompiling.OSv is quite capable of running unmodified Linux executables, as long as they use the subset of Linux ABI OSv actually supports (IOW, no fork(), for example).But application need to be recompiled on OSv, it's better to support to be without recompiling.No, OSv does _not_ require applications to be recompiled. What makes you think it does?OSv implements a subset of the Linux system call ABI and has a built-in ELF loader and linker. This allows OSv to run *unmodified* Linux binaries.I think Qixuan may be referring to the fact that OSv today can only run position-independent executables (shared objects and PIE), and nor "regular" position-dependent executables,which causes us in many applications in apps/ to modify the Makefile to add "-shared", "-pie", or something like that, requiring recompilation.However, Qixuan, the interesting thing to note that an application that already has been compiled as shared object or PIE, can often run on OSv completely unmodified.Shared objects are particularly common in case of runtime environments, such as Java or Python, where even on Linux, the majority of the code is a shared object, which we can copy as-is into OSv without any recompilation, and there is just a 20-line front-end executable which, perhaps, needs to be recompiled (this is exactly our situation with Java and Python).Shared objects are also common, of course, as shared libraries. So even if you do need to recompile part of your code, you most certainly don't need to recompile the dozen shared libraries your code needs and you can just copy as-is into the OSv image, which saves a huge amount of porting work.PIE instead of classic position-dependent executables are becoming popular on some Linux distributions because of their security benefits, so if you find one, you can try running it on OSv unmodified. Note, however, that there are some open bugs which may prevent them from working correctly: https://github.com/cloudius-systems/osv/issues/689, https://github.com/cloudius-systems/osv/issues/352Finally, there is no real reason why OSv shouldn't be able to run *one* position-dependent Linux executable. It will just need some more coding. There's an open issue about it: