TechNewsReel
Live

Developer proposes SELF format to turn Linux executables into SQLite databases

The new approach replaces opaque binary blobs with queryable databases, potentially collapsing traditional binary analysis tools into standard SQL.

TechNewsReel Newsroom · August 26, 2026

Developer F. Zakaria has introduced a new executable format called SELF that replaces traditional binary structures with SQLite databases. By transforming a program from a static blob into a structured database, the format allows developers to interact with compiled code using standard SQL queries.

To make this possible on Linux, SELF leverages the kernel's binfmt_misc feature to register a custom interpreter. When the system attempts to run a SELF file, this interpreter triggers and maps specific rows from a 'segments' table within the SQLite database directly into memory. Once these segments are mapped, the interpreter jumps to the program's entry point to begin execution. This mechanism allows the program to function as a standard executable while remaining a fully functional database on disk.

The problem with opaque binaries

For decades, the industry has relied on formats like ELF (Executable and Linkable Format). While efficient for execution, ELF files are essentially opaque to the user. Inspecting or manipulating them requires specialized, often complex binary tooling such as objdump or readelf. Zakaria's work seeks to bridge this gap by combining the accessibility of SQLite with the reproducibility of Nix, creating a binary that is natively queryable without needing external analysis tools.

Collapsing the binary toolchain

The implications for software engineering are significant. If adopted, the transition to a database-backed executable would fundamentally change how developers perform binary analysis, debugging, and patching. Instead of using proprietary or niche tools to parse binary headers and sections, a developer could simply run a SELECT statement to find specific data or instructions within the executable. As Zakaria noted, this shift means "a whole class of binary tooling collapses into SQL."

Future outlook

While the implementation demonstrates a working proof of concept via binfmt_misc, the broader adoption of SELF would require a shift in how compilers and linkers output machine code. For now, the project serves as a functional exploration of how structured data formats can replace legacy binary blobs. It remains to be seen if the performance overhead of the SQLite interpreter will be negligible enough to encourage widespread use over the leaner, traditional ELF format.

Sources

Get a notification when a big story breaks. A few a day at most — no spam.