Tutorial on Creating Really Teensy ELF Executables for Linux
muppetlabs.com
muppetlabs.com
You can also use 'strip' to remove debug information not needed (normally appended to the end of the file).
http://zecke.blogspot.com/2009/10/what-is-size-of-qlistdata-...
[...] Well, actually, it could be made smaller. When Linux starts up a new executable, one of the things it does is zero out the accumulator (as well as most of the other registers). Taking advantage of this fact would have allowed me to remove the xor [...]
Removing the xor reduces the program size to 43 bytes. Closer, but not there yet :-)
However, neither the original nor the 43-byte version run on my machine [1]. The first is simply Killed, the second doesn't even load: cannot execute binary file.
[1] Linux 2.6.28 i686 (Ubuntu 9.04 on Pentium M)
[1] Linux 2.6.31 x86_64
Yes, modern software is comparatively huge and bloated, but the less your average programmer has to worry about code size and speed, the larger the the body of useful applications we'll have.
I've heard there are similar such hacks in the world microbiology, overlapping genes giving bacteria a selective advantage. But in the world of people, genomic code bloat is apparently not a problem.
If you want to see absolutely blistering speed try installing a 10 year old linux distro with X on it.