From mboxrd@z Thu Jan 1 00:00:00 1970 From: ron@ronnatalie.com (Ronald Natalie) Date: Thu, 19 Oct 2017 22:05:15 -0400 Subject: [TUHS] /bin/true (was basic tools / Universal Unix) In-Reply-To: References: <009a01d348e9$e3dce200$ab96a600$@ronnatalie.com> Message-ID: <83C77FBE-A007-4F06-AB2B-0203710576D7@ronnatalie.com> Of course, 4K is in the noise on a machine with 32 Gig or more of memory. The old PDP-11 could put a 136 byte executable (assuming the standard UNIX V6 a.out header into two 64 byte chunks of memory. Not too shabby even in those days. > On Oct 19, 2017, at 9:31 PM, Lyndon Nerenberg wrote: > > >> 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.