4 ms·
I love articles like this. If you want to see a tutorial on how you can take this a step further, by creating a tiny ELF file that runs on Linux, FreeBSD, NetBS
by jart 2y ago
I love articles like this. If you want to see a tutorial on how you can take this a step further, by creating a tiny ELF file that runs on Linux, FreeBSD, NetBSD, and OpenBSD 7.3 then check out https://justine.lol/sizetricks/#elf https://justine.lol/sizetricks/#elf
- matheusmoreira 2y agoI would also recommend the legendary Teensy Files: https://www.muppetlabs.com/~breadbox/software/tiny/ https://www.muppetlabs.com/~breadbox/software/tiny/ They sparked my interest in ELF and freestanding programs.
- cylinder714 2y agoAnd Chris Wellons' "A Magnetized Needle and a Steady Hand," detailing how to build an ELF implementation of 'true' using nothing more than 'echo' or 'printf': https://nullprogram.com/blog/2016/11/17/ https://nullprogram.com/blog/2016/11/17/
- matheusmoreira 2y agoHuge fan of that blog and its author!
- LegionMammal978 2y agoIf anyone's interested, last year I replicated this exercise for an x86-64 Linux executable [0], and also golfed a Hello World as small as I could. I ended up using a little-known pattern (an ET_DYN executable with no interpreter, normally only used for the ld.so binary) to shave off more bytes than anyone else who had tried it, to the best of my knowledge. [0] https://tmpout.sh/3/22.html https://tmpout.sh/3/22.html