First release of Blink, a high performance x86-64 emulator

The first significant release of the Blink project has been published, developing an x86-64 processor emulator that allows you to run statically and dynamically built Linux applications in a virtual machine with an emulated processor. Using Blink, Linux programs compiled for the x86-64 architecture can be run on other POSIX-compliant operating systems (macOS, FreeBSD, NetBSD, OpenBSD, Cygwin) and on hardware with other hardware architectures (x86, ARM, RISC-V, MIPS, PowerPC, s390x). The project code is written in C (ANSI C11) and distributed under the ISC license. Of the dependencies, only libc (POSIX.1-2017) is required.

In terms of functionality, Blink resembles the qemu-x86_64 command, but differs from QEMU in a more compact design and a significant performance boost. For example, the Blink executable file takes only 221 KB (with a truncated build - 115 KB) instead of 4 MB for qemu-x86_64, and in terms of performance in some tests, such as running in the GCC emulator and performing mathematical operations, it overtakes QEMU by about two times.

To ensure high performance, a JIT compiler is used, which converts source instructions into machine code for the target platform on the fly. Direct launch in the emulator of executable files in the ELF, PE (Portable Executables) and bin (Flat executable) formats, compiled with the standard C libraries Cosmopolitan, Glibc and Musl, is supported. Implemented native support for 180 Linux system calls and emulation of about 600 x86 processor instructions covering the i8086, i386, SSE2, x86_64, SSE3, SSSE3, CLMUL, POPCNT, ADX, BMI2 (MULX, PDEP, PEXT), X87, RDRND, RDSEED instruction sets and RDTSCP.

Additionally, on the basis of Blink, the blinkenlights utility is being developed, which provides an interface for visualizing the program execution and analyzing the contents of memory. The utility can be used as a debugger that supports the reverse-debugging mode (Reverse-Debugging) and allows you to move back in the execution history and return to a previously executed point. The project is developed by the author of such developments as the C-library Cosmopolitan, a port of the pledge isolation mechanism for Linux, and the Redbean universal executable file system.

First release of Blink, a high performance x86-64 emulator


Source: opennet.ru

Add a comment