TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Whirlwind Tutorial on Creating Teensy ELF Executables for Linux (2001)

34 pointsby Ivoahabout 1 year ago

3 comments

josephcsibleabout 1 year ago
A few things have changed since 2001 that require extra flags to be able to follow along:<p>1. Most systems today are 64-bit, where gcc needs &quot;-m32&quot; to build the 32-bit assembly code that this article uses.<p>2. Modern versions of GCC&#x27;s ld enable &quot;-z separate-code&quot; by default, which adds several kilobytes of padding that completely dwarfs everything this article does until you start hand-crafting ELF files. Passing &quot;-Wl,-z,noseparate-code&quot; to gcc undoes this.<p>3. Most Linux distros now configure GCC with &quot;--enable-default-pie&quot;, which similarly inflates all of the binaries by several kilobytes. Passing &quot;-no-pie&quot; to gcc undoes this.
prosaic-hackerabout 1 year ago
Being nerd sniped into thinking I could learn how to do the same thing for X64.<p>Backing away from the assembler.
评论 #40007830 未加载
mtlynchabout 1 year ago
(2001)<p>Also, this is &quot;teensy&quot; as in &quot;very small&quot; rather than the Teensy microcontroller.