Shameless plug: write your program in C, get almost as little size overhead as in the Whirlwind turorial: <a href="https://github.com/pts/minilibc686">https://github.com/pts/minilibc686</a> (libc, compiler, linker, settings)
I tried to replicate this on my 64 bit machine, so<p><pre><code> nasm -f elf64 tiny.s && ld -s tiny.o
; tiny.asm
BITS 64
GLOBAL _start
SECTION .text
_start:
mov eax, 1
mov ebx, 42
int 0x80
</code></pre>
and this lands me at 4320 bytes!
Why is there such a stark difference?
Does anyone recall an “intro to computing” style book that was available free online and starts with using the gas assembler and talked a lot about elf format executables? I lost the link a while ago and don’t recall the name.
for those excited about tiny ELF executables, or tiny programs in general, check out the Lovebyte size-coding demoparty happening next weekend. It's likely there will be a few tiny ELF entries there.