mikemacd writes "As mentioned before the folks over at properkernel.com ran a programming challenge. The results are in. Hopefuly they will post code too."
So you have to write a minimal header, then print a string.
For some perspective: the normal ELF header is 52 bytes long, and the string including line feed is 55 bytes. The winner did it in 102, less than the sum of those. Wow.
The next thought: why in heck didn't they print source (as if he didn't build that binary by hand), the binaries, or any info at all about how they did this!! It's stupid to look at the results only, so many questions, so few answers...
-- I believe posters are recognized by their sig. So I made one.
It looks like the winning entry actually does not output the required string. If you look at the winning entries code it is actually outputting the string: 'The deep ' 0x0 0x1 0x0 ' gray mouse runs after the holy yellow cheese.' 0xA Where the 0x0 0x1 0x0 are required fields in the ELF header that splits the message into two halves. The output might appear to be correct when displayed on a terminal but if you redirect it to a file you will see the extra bytes.
Modifying the code to not output the extra bytes would add 9 bytes to the program and it would larger than the next smallest binary, assuming that the 104 byte entry didn't use the same trick.
correct me if i'm wrong, but it's quite easy to store this text, including the code to extract it to ASCII, in a lot less than 55 bytes...
Remember, it has to be done as an ELF binary. So you have to write a minimal header, then print a string :)
-s
-
ping -f 255.255.255.255 # if only
So you have to write a minimal header, then print a string.
For some perspective: the normal ELF header is 52 bytes long, and the string including line feed is 55 bytes. The winner did it in 102, less than the sum of those. Wow.
The next thought: why in heck didn't they print source (as if he didn't build that binary by hand), the binaries, or any info at all about how they did this!! It's stupid to look at the results only, so many questions, so few answers...
I believe posters are recognized by their sig. So I made one.
I wrote a Java class that does it in ...2.3 meg ...and uses half my RAM ...and takes 30 seconds to load ...oh never mind.
"In a 32-bit world, you're a 2-bit user. You've got your own newsgroup, alt.total.loser." -Weird Al
It looks like the winning entry actually does not output the required string. If you look at the winning entries code it is actually outputting the string:
'The deep ' 0x0 0x1 0x0 ' gray mouse runs after the holy yellow cheese.' 0xA
Where the 0x0 0x1 0x0 are required fields in the ELF header that splits the message into two halves. The output might appear to be correct when displayed on a terminal but if you redirect it to a file you will see the extra bytes.
Modifying the code to not output the extra bytes would add 9 bytes to the program and it would larger than the next smallest binary, assuming that the 104 byte entry didn't use the same trick.