Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your executable is a SQLite database

Your executable is a SQLite database Farid Zakaria describes a neat Linux pattern for creating a SQLite database file that can be directly used as an executable binary. The trick sets the SQLite file format's 4-byte application ID (68 bytes into the file) to SELF, standing for Structured Executable & Linkable Format. The various components of the ELF executable format are then arranged into a…

Farid Zakaria explains a Linux technique for using a SQLite database file as an executable binary. The method involves setting the SQLite file format's 4-byte application ID (located 68 bytes into the file) to SELF, which stands for Structured Executable & Linkable Format. This application ID is then used to arrange the various components of the ELF executable format into different SQLite tables.

The self-exec interpreter, written in C code, can extract and execute the necessary pieces of the executable from these tables. Additionally, a Linux mechanism called binfmt_misc can be employed to teach the kernel to execute any file matching this binary pattern upon encounter.

The process can be executed using NixOS, although registration can be done manually without NixOS. This technique was shared by Simon Willison on 24th August 2026 in a link post, and the reader is encouraged to sponsor Willison with $10/month for a curated email digest of the month's most important LLM developments.

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

Read the original at simonwillison.net →

More in Tech

More from Monday 24 August →