Skip to content

Does PolkaVM do static or dynamic binary translation? #263

Answered by koute
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

It's a single pass recompiler that translates the whole module when it's instantiated.

Here's our toolchain pipeline:

Basically the idea is to move as much code and complexity offline into polkavm-linker. The polkavm-linker is what actually ingests a vanilla RISC-V ELF file and translates it into a form that the VM/recompiler can accept. It supports arbitrary programs as long as no self-modifying code is present and the program doesn't try to inspect its own raw RISC-V machine code nor has any dynamic jumps which depend on the RISC-V machine code offsets being preserved (so 99.9% of programs are compatible).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@koute
Comment options

Answer selected by koute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant