[TUHS] /bin/true (was basic tools / Universal Unix)

Lyndon Nerenberg lyndon at orthanc.ca
Fri Oct 20 11:31:16 AEST 2017

> On Oct 19, 2017, at 6:27 PM, Dan Cross <crossd at gmail.com> wrote:
> macOS requires you to have a data section aligned to 4K, even if you
> don't use it. The resulting binary is a little over 8K; again, mostly
> zeros.
> There are parlor tricks people play to get binary sizes down to
> incredibly small values, but I found the results interesting. Building
> the obvious C program on a PDP-11 running 7th Edition yields a 136
> byte executable, stripped. Still infinitely greater than /bin/true in
> the limit, but still svelte by modern standards.

No matter how tiny you can make the a.out, the kernel's still going to have to map in at least one page to hold it, so you're eating a minimum of 4K on any modern machine, regardless.

More information about the TUHS mailing list