• @uis@lemmy.world
        link
        fedilink
        6
        edit-2
        1 year ago

        This… Is not exactly how it works.

        The way windows ABI works is syscalls always should go through dynamic libraries first, while on linux syscalls do syscall instruction/*. How windows syscalls work allows project like WINE just implement those libraries that will do linux syscalls. No instructions translated.

        But with other architectures story is different. You either make instruction decoder for processor, make interpreter or make binary translator. First is itanium-way, second is naive way and third is how everyone does. Third is basically compiling one machine code to another. It has overhead of, well, compiling one machine code to another. And it works badly with other JIT compilers.

        *there is vDSO, which is dynamic library, that implements syscalls like getting time. It is totally optional.