Your executable is a SQLite database
- ID
- 17191
- Status
- summarized
- Published
- 24 Aug 2026, 7:38 PM
- Fetched
- 24 Aug 2026, 7:48 PM
- Provider
- Simon Willison
- Category
- developer-ai
- Original URL
- https://simonwillison.net/2026/Aug/24/your-executable-is-a-sqlite-database/
- Source URL
- https://simonwillison.net/atom/everything/
Summary
- Score
- 3.0
- Created
- 24 Aug 2026, 7:48 PM
- Tags
- Audience
- developersdatabase_learners
What happened
Farid Zakaria describes a Linux pattern where a SQLite database file doubles as an executable ELF binary by setting the SQLite file's 4-byte application ID (at byte offset 68) to 'SELF' and storing ELF components across SQLite tables. A custom self-exec interpreter extracts and runs the pieces, and Linux's binfmt_misc mechanism can register the pattern so the kernel executes it directly. The approach is demonstrated on NixOS but should work on other Linux distros with manual binfmt_misc registration.
Why it matters
This is a clever hack with near-zero practical impact for most builders—it's a curiosity about file format overlap between SQLite and ELF. Unless you ship Linux distribution tooling or care about polyglot binary formats, there is nothing here to change in your workflow.
Discussion angle
Worth a 2-minute 'cool trick' mention: how SQLite's permissive file format lets you abuse it as a container for arbitrary structured data, and whether this pattern has any real-world use beyond novelty.