Look who's talking!

Detail illustration WASM I/O Detail illustration WASM I/O
Masashi Yoshimura

elfconv: AOT compiler that translates Linux/AArch64 ELF binary to WebAssembly

Masashi Yoshimura - NTT Corporation


WebAssembly (WASM) enables us to use sandbox environments on edge devices and servers as well as browsers so that we can distribute platform-independent and secure applications. Previously, we could compile from several programming languages to WASM binary, but could not generate them if we cannot use source codes. In this talk, Masashi will introduce “elfconv”, an AOT compiler that translates Linux/AArch64 ELF binary into WebAssembly. This compiler generates an LLVM bitcode that translates every instruction of the original ELF binary based on remill (library for lifting machine code to LLVM IR) and uses emscripten to generate the WASM binary. we can execute the generated WASM binary on both browsers and host environments using emscripten or WASI Runtimes (e.g. WasmEdge, wasmtime). This presentation will describe the technical details (methods to translate to LLVM bitcode and emulate Linux syscall targeting WASM) of elfconv and the performance and future perspectives. However, elfconv is a work in progress, thus CPU instructions and Linux syscalls are partially supported now. To be able to convert any ELF binary, we should support any Linux syscalls and shared libraries, etc, the challenging functions that are important to WASM specifications, and we will implement those functions in the future. Therefore, we believe that this talk will become valuable to WASM specifications and ecosystems.

View all sessions