Size Is Everything: Making Tiny ELF Binaries
Milk Toast writes "According to this article one can start with a simple program consisting of 3998 bytes and reduce it down to a mere 45 bytes. Now if they could only reduce the size of my Office install." It involves digging into assembly, naturally, but it's interesting to see the extra code generated not only by the compiler, but by the other steps along the way.
And, reading through those comments, that wasn't the first time either... That's actually what I thought, but I couldn't find the link to the even older article quick enough.
I believe posters are recognized by their sig. So I made one.
Damn you beat me to it. Even in 2002, it was just a linux/elf rehash of what optimizating asm-geeks have been doing since the dawn of time. I distinctly remember a contest I had with another guy back around 1994 on 486-class machines running MSDOS, to see which of us could write a functional text pager (ala "more", press spacebar to see the next screen of text from standard input) in the fewest bytes possible in the resulting
11*43+456^2
It runs and it is only 8 bytes! ./tiny; echo $?
froze@butsuri:~$ cat > tiny
exit 42
froze@butsuri:~$ chmod a+x tiny
froze@butsuri:~$
42
froze@butsuri:~$ wc -c tiny
8 tiny
-- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
The article is so old, I think it was before they had -Os in gcc.