<?xml version='1.0'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
	<title><![CDATA[PublMe - Space: Posted Reaction by PublMe bot in PublMe]]></title>
	<link>https://publme.space/reactions/v/65219</link>
	<atom:link href="https://publme.space/reactions/v/65219" rel="self" type="application/rss+xml" />
	<description><![CDATA[]]></description>
	
	<item>
	<guid isPermaLink="true">https://publme.space/reactions/v/65219</guid>
	<pubDate>Tue, 31 Mar 2026 22:00:26 +0200</pubDate>
	<link>https://publme.space/reactions/v/65219</link>
	<title><![CDATA[Posted Reaction by PublMe bot in PublMe]]></title>
	<description><![CDATA[
<p>How Small Can A Linux Executable Be?</p>
<div><img width="800" height="497" src="https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?w=800" alt="A hex dump of the first iteration of the small ELF file" srcset="https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png 840w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?resize=250, 155 250w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?resize=400, 249 400w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?resize=800, 497 800w" data-attachment-id="1067265" data-permalink="https://hackaday.com/2026/03/31/how-small-can-a-linux-executable-be/nanoelf/" data-orig-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png" data-orig-size="840,522" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="nanoelf" data-image-description="" data-image-caption="" data-medium-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?w=400" data-large-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf.png?w=800"></div><p>With ever increasing sizes of various programs (video games being notorious for this), the question of size optimization comes up more and more often. [Nathan Otterness] shows us how it’s done by <a rel="nofollow" href="https://nathanotterness.com/2021/10/tiny_elf_modernized.html" target="_blank">minifying a Linux “Hello, World!” program to the extreme</a>.</p><p>A naive attempt at a minimal hello world in C might land you somewhere about 12-15Kb, but [Nathan] can do much better. He starts by writing everything in assembly, using Linux system calls. This initial version without optimization is 383 bytes. The first major thing to go is the section headers; they are not needed to actually run the program. Now he’s down to 173 bytes. And this is <em>without</em> any shenanigans!</p><figure aria-describedby="caption-attachment-1067267"><a rel="nofollow" href="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png"><img data-attachment-id="1067267" data-permalink="https://hackaday.com/2026/03/31/how-small-can-a-linux-executable-be/nanoelf-butevensmaller/" data-orig-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png" data-orig-size="856,197" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="nanoelf-butevensmaller" data-image-description="" data-image-caption="&lt;p&gt;The final tiny ELF file&lt;/p&gt;" data-medium-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?w=400" data-large-file="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?w=800" src="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?w=400" alt="A hexdump of the final ELF file, significantly smaller than the original" width="400" height="92" srcset="https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png 856w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?resize=250, 58 250w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?resize=400, 92 400w, https://hackaday.com/wp-content/uploads/2026/03/nanoelf-butevensmaller.png?resize=800, 184 800w"></a><figcaption>The final tiny ELF file</figcaption></figure><p>The first shenanigans are extreme code size optimizations: by selecting instructions carefully (and in a way a C compiler never would), he shaves another 16 bytes off. But the real shenanigans begin when he starts looking for spaces in the ELF header that he can clobber while the program is still accepted by Linux: now he can move his already tiny x86_64 code into these “vacant” spaces in the ELF and program headers for a final tiny ELF file weighing in at just 120 bytes.</p><p>P.S.: We know it is possible to make this smaller, but leave this as an exercise to the viewer.</p>]]></description>
	<dc:creator>PublMe bot</dc:creator>
</item>

</channel>
</rss>