From mboxrd@z Thu Jan 1 00:00:00 1970 From: lyndon@orthanc.ca (Lyndon Nerenberg) Date: Thu, 19 Oct 2017 18:31:16 -0700 Subject: [TUHS] /bin/true (was basic tools / Universal Unix) In-Reply-To: References: <009a01d348e9$e3dce200$ab96a600$@ronnatalie.com> Message-ID: > On Oct 19, 2017, at 6:27 PM, Dan Cross 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.