[HN Gopher] A Whirlwind Tutorial on Creating Teensy ELF Executab...
       ___________________________________________________________________
        
       A Whirlwind Tutorial on Creating Teensy ELF Executables for Linux
        
       Author : Alupis
       Score  : 41 points
       Date   : 2022-08-19 17:43 UTC (5 hours ago)
        
 (HTM) web link (www.muppetlabs.com)
 (TXT) w3m dump (www.muppetlabs.com)
        
       | LandStander wrote:
       | I thought this was going to be about the Teensy boards.
       | https://www.pjrc.com/teensy/
        
         | JLCarveth wrote:
         | That was my thought when I read the title. This was my first
         | experience with an MCU
        
         | LargoLasskhyfv wrote:
         | Anything cortexy would profit from teensy binaries.
        
       | lxe wrote:
       | Love this every time it gets posted. Similar vibes to the Justine
       | Tunney's cosmopolitan / actually pdrtable executable world.
        
         | mistrial9 wrote:
         | this use of greek letters for marketing memorability seems
         | "tone-deaf" to me, in other words, lacking any respect for
         | modern greek
        
           | cestith wrote:
           | I can't imagine screen readers do a great job of seeing
           | Greclish and giving visually impaired users a sensible
           | pronunciation, either.
        
             | [deleted]
        
       | nousermane wrote:
       | I guess this was written a fair while ago. On my laptop, even in
       | 32-bit (i686) mode, with gcc-12 and libc-2.34:
       | 
       | - very first, unoptimized program compiles to 15440 bytes (vs
       | 3998 on OP's system);
       | 
       | - super-optimized hand-rolled assembly (tiny.s) compiles to 12780
       | bytes (vs 368 on OP's system).
        
         | Alupis wrote:
         | I'm wondering if our binaries have really bloated this much, or
         | if there was something the old GCC's did that we no longer get
         | "for free".
         | 
         | On my Rocky Linux 8.5 machine with kernel 4.18.x, gcc 8.5.x,
         | and glibc 2.28.x, the sample C program compiles to 17,800 bytes
         | - after stripping, it's down to 6,768 bytes. 16,292 bytes in 32
         | bit mode, 6,148 after stripping.
         | 
         | To put things in perspective, the AVR ATTiny85 only has 8KB of
         | program memory, meaning this simple "return 42" program
         | wouldn't even fit as-is.
         | 
         | Seems glibc does add a considerable amount of "bloat" to the
         | binary. I wonder what a properly "golfed" ELF binary file size
         | would be today?
        
       ___________________________________________________________________
       (page generated 2022-08-19 23:01 UTC)