A Minimalist Linux Kernel Module: 7-Byte Executables

2025-04-10

The author crafts a custom, metadata-less binary file format for Linux using a kernel module. Initially aiming for tiny ELF executables (achieving a 45-byte minimum), the exploration delves into smaller aout formats, culminating in a 7-byte, and later a 2-byte, executable. The article details creating the kernel module, a custom loader supporting the new format, handling heap and command-line arguments, and improvements automating program exit. This journey showcases the power of kernel modules and the art of minimizing executables.