HN Hall of Fame Weekly email

Tiny ELF Files: Revisited in 2021

nathanotterness.com Essays & writing Essays & articles Software engineering Candidate
Screenshot of nathanotterness.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 2 of them.

submissions
4
submitters
4
observed span
2021–2026
peak thread · 27 comments
140 pts
latest 20+ return · 2026-04-01
41 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

It's possible to make the code slightly smaller, by relying on Linux zeroing registers when the program starts. That's part of the Linux ABI, and couldn't be changed without breaking programs, so it's safe to rely on. Reducing the size of the code allows embedding it in less of the header, giving more options for code layout.

Last November, I looked into this problem a bit more thoroughly, studying all the conditions that the Linux kernel actually checks. My conclusion was that the absolute smallest possible 64-bit ELF file in Linux was 80 bytes. (The smallest 32-bit ELF file was indeed 45 bytes, as in the original article.) This version was written to simply call _exit(0), but I recall that there are a few more opcode bytes to spare: 00000000: 7f45 4c46 b0e7 0f05 0000 0000 0000…

Shameless self-promotion: I think I hold the record (83 bytes) for the shortest hello-world Linux ELF executable: https://github.com/pts/mininasm/blob/master/demo/hello/hello...

ptspts·41-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
2

100+ points or 50+ comments

Total points
292

reference only — not used in Hall rules or ranking

Total comments
41

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2021-10-11Tiny ELF Files for Linux: Revisited in 2021yalue60
2021-10-13Tiny ELF Files: Revisited in 2021First breakout · Best threadzdw14027
2023-07-10Tiny ELF Files: Revisited in 2021jandeboevrie10512
2026-04-01The smallest ELF executable (2021)Latest 20+ point returnmichelangelo412