4 ms·
Why don't we just distribute ELF binaries, and have them execute in a sandbox?
by nfoz 11y ago
Why don't we just distribute ELF binaries, and have them execute in a sandbox?
- wyldfire 11y agoWon't work on: (1) systems expecting COFF binaries, (2) systems who support ELF but use a different architecture. For #2, there's several very popular archs to support: x86, x86_64, arm*, mips, x32. AFAIK ELF doesn't (yet?) support multiple arch-in-a-single-file.
- pcwalton 11y agoBecause that would not be portable.
- nfoz 11y agoThe browsers define what is portable. They're choosing to interpret webasm instead of ELF, or JVM bytecode. I guess I don't know why. If people just want to distibute sandbox-binaries to each other, that's what the JVM was for. And the reason we needed that was because some OS vendors specifically had no interest in interoperability of native binaries, and also (this one really puzzles me) have still failed to implement sane sandboxing of programs in user-space.
- pcwalton 11y agoELF is just a container format for ISA-specific binaries. It doesn't solve portability between x86 and ARM, for example. The JVM lacks integration with the DOM (important when you have, for example, cross-language cycles) and is also not a good target for C and C++ apps due to various missing features (unsigned ints, SIMD, etc). It is also not easily polyfillable.