3 ms·
It would have been brilliant if he could have reduced the program size to 42 bytes - the same as the result when you run it, and the answer to everything.
by Luyt 17y ago
It would have been brilliant if he could have reduced the program size to 42 bytes - the same as the result when you run it, and the answer to everything.
- alnayyir 17y agoGiven the end size, some simple padding wouldn't allowed for that, but I don't think he was trying to behave like a complete nonce.
- silvajoao 17y agoIn the postscript he mentions: [...] 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)
- kelnos 17y agoThe original runs fine for me[1], but if you actually read the last bit of the article, you'll see that there's no way to get it below 45 bytes and convince the kernel to still run it. The 45th byte specifies the number of entries in the program header table, and that can't be zero (or missing). [1] Linux 2.6.31 x86_64
- deleted 17y ago[deleted]