Shameless plug: write your program in C, get almost as little size overhead as in the Whirlwind turorial: https://github.com/pts/minilibc686 (libc, compiler, linker, settings)
Your linker must align the .text section to the page size (often 4096 bytes). If you open the binary with a hex editor you'll see lots of null padding.
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.
You are probably thinking about
Programming from the Ground Up by Jonathan Bartlett. There are many others in the same style though. He also has a newer book if I recall right.
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.
That's neat, I didn't know that there was much sizecoding activity with ELFs, except for the BGGP competitions [0]. (Mainly because it's not nearly as easy to output graphics than on all the old-school platforms, I'd imagine.) Does Lovebyte publish previous years' demos anywhere?
I think I am the "inventor" of the first 64 and 32 byte intro competitions. (Just checked, we ran a 64 byte competition at the 0a000h 2002 and added 32 byte in 2003.) See https://0a000h.de/2002/ and https://0a000h.de/2003/ - releases are on scene.org
ptspts|1 year ago
dang|1 year ago
A Whirlwind Tutorial on Creating Teensy ELF Executables for Linux - https://news.ycombinator.com/item?id=32524007 - Aug 2022 (10 comments)
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (1999) - https://news.ycombinator.com/item?id=21846785 - Dec 2019 (22 comments)
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux (2005) - https://news.ycombinator.com/item?id=11709247 - May 2016 (5 comments)
Creating Really Teensy ELF Executables for Linux - https://news.ycombinator.com/item?id=8745024 - Dec 2014 (13 comments)
The Teensy Files: Creating teensy ELF executables for Linux - https://news.ycombinator.com/item?id=8642734 - Nov 2014 (7 comments)
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux - https://news.ycombinator.com/item?id=5016434 - Jan 2013 (14 comments)
Tutorial on Creating Really Teensy ELF Executables for Linux - https://news.ycombinator.com/item?id=875077 - Oct 2009 (16 comments)
3998-byte executable reduced to 45 bytes - https://news.ycombinator.com/item?id=68056 - Oct 2007 (10 comments)
jart|1 year ago
cryne|1 year ago
oguz-ismail|1 year ago
Your linker must align the .text section to the page size (often 4096 bytes). If you open the binary with a hex editor you'll see lots of null padding.
le-mark|1 year ago
tiu|1 year ago
https://www.amazon.com/Programming-Ground-Up-Jonathan-Bartle...
https://download-mirror.savannah.gnu.org/releases/pgubook/
deater|1 year ago
LegionMammal978|1 year ago
[0] https://binary.golf/
hannob|1 year ago
I think I am the "inventor" of the first 64 and 32 byte intro competitions. (Just checked, we ran a 64 byte competition at the 0a000h 2002 and added 32 byte in 2003.) See https://0a000h.de/2002/ and https://0a000h.de/2003/ - releases are on scene.org