from Hacker News

A whirlwind tutorial on creating teensy ELF executables for Linux (1999)

by xtacy on 2/7/25, 4:16 AM with 17 comments

  • by ptspts on 2/8/25, 8:03 PM

    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)
  • by dang on 2/8/25, 7:08 PM

    Related. Others?

    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)

  • by cryne on 2/9/25, 2:33 AM

    I tried to replicate this on my 64 bit machine, so

      nasm -f elf64 tiny.s && ld -s tiny.o
    
      ; tiny.asm
      BITS 64
      GLOBAL _start
      SECTION .text
      _start:
                    mov     eax, 1
                    mov     ebx, 42  
                    int     0x80
    
    and this lands me at 4320 bytes! Why is there such a stark difference?
  • by le-mark on 2/8/25, 10:17 PM

    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.
  • by deater on 2/8/25, 11:02 PM

    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.