Urgent.News

What's breaking now, across thousands of outlets.

Tech

Executable Is a SQLite Database

Article URL: https://fzakaria.com/2026/08/23/your-executable-is-a-sqlite-database Comments URL: https://news.ycombinator.com/item?id=49415271 Points: 397 # Comments: 81

In recent years, the author has been fascinated by two ideas: Nix and replacing ELF with SQLite as an executable format. They explored the latter during their PhD but found feedback from others unconvincing. The result was sqlelf, a tool for exploring ELF files declaratively using SQL. The author then developed a prototype called SELF, the Structured Executable & Linkable Format, which is now available on GitHub.

By leveraging virtual tables over the ELF, SELF demonstrates that the ELF file format can be replaced by SQLite as an executable format. The SELF file requires two tables to run: self_meta, which stores the ELF header as key/value pairs, and segments, which hold the load image, with one row per program header containing the bytes in a BLOB.

The symbol table replaces many of the ELF sections and the .gnu.hash index, providing a single table with a single index that is equivalent to .gnu.hash and .hash in ELF. This approach simplifies the format and allows for easier modification and querying. The author has created a tool called elf2self that converts ELF files into SELF files, and a small interpreter called self-exec that runs SELF files using SQLite.

This new format simplifies the process of analyzing and modifying ELF files, as all tools that operate on ELF files can now be implemented as queries over the database.

Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at fzakaria.com →

More in Tech

Sync Enterprise Data: React Query + Server Actions 🔄

The Gap in the App Router Caching System The Next.js App Router introduced a revolutionary, multi-tiered caching system. Between the Data Cache, the Full Route Cache, and the Client Router Cache…

  • Next.js App Router features Data Cache, Full Route Cache, and Client Router Cache
  • Enterprise apps lack Client-Side State Synchronization in Next.js architecture

More from Monday 24 August →