Tool Open source

SELF (Structured Executable & Linkable Format)

SELF is an experimental executable format and Linux/NixOS runtime in which a program is stored as a SQLite database rather than an ELF file. Its rows represent the executable format, and a binfmt_misc interpreter can rebuild an ELF in memory and execute it with execveat, map segments and hand off to the dynamic linker, or act as a dynamic linker that binds through SQL; the project also provides ELF/SELF conversion tools, a selfifying Nix hook, a NixOS module, and an LD_AUDIT library for resolving .self shared libraries through SQL.

View repository Mentioned in 2 videos ↓

Overview

The repository includes self-httpd, a web server whose program, routes, pages, and visitor log are stored in one database file. It opens its own executable path as a database and serves routes from its routes table, so editing the live site is performed with an SQL UPDATE. SELF databases can also be queried for executable information, such as shared-library names, and modified transactionally, including deleting sections and vacuuming the database.

What SELF (Structured Executable & Linkable Format) is used for

2 uses taken from transcripts — each links to the moment in the video.

  • An experimental format in which a program is a SQLite database rather than an ELF file. Its Linux interpreter reconstructs or maps the program at launch, and its included web server stores code, routes, pages, and visitor logs in one file.

  • Stores executable programs as SQLite database rows containing sections, symbols, and dependencies. Its SQL interface can inspect or strip binaries that continue to run through a custom kernel loader.

Videos mentioning SELF (Structured Executable & Linkable Format)

2 in the library.