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.

On ELF, Part 2 (2018)

109 pointsby gbrown_over 3 years ago

11 comments

gumbyover 3 years ago
&gt; I show how ELF-like features can be safely retrofitted onto executable formats contemporary with ELF’s debut.<p>I am surprised at the naïvité of the author on this question as from his photo he probably lived through this transition in real time. The statement ignores the whole point, sort of liking saying “all modern computers are basically Turing machines.” True, but not insightful.<p>It was no surprise to anyone at the time that various other required features <i>could</i> be jammed into other approaches (well, not a.out which is too simple) and often were in ad hoc and incompatible ways. In fact I designed the bfd library specifically with this in mind, to try to give some generality to object file generation and manipulation.<p>ELF was designed by committee, but it is not a camel. It addresses a number of complex issues in a standard and extensible way. Issues that didn’t arise on a time shared PDP-11 in the 1970s.
Taniwhaover 3 years ago
I worked with a.out on early unixes and elf on later ones - not addressed here is the main reason for switching: ELF allowed you manage pages contiguously on disk so that they could be paged in directly (stuff can be page aligned within the file at it&#x27;s natural offsets), while a.out was designed for swapped kernels where you would just read() data into a text section, address 0 might be 32 bytes from the start of a file (disk space was more of a concern back then).
评论 #29666280 未加载
评论 #29661202 未加载
rwmjover 3 years ago
This is all well and good, but in reality everyone is using all the rich features of ELF -- dynamic linking obviously, but also symbol versioning, constructors, symbol interposition (probably the worst one for performance), symbol visibility, preload, etc. The question is how to make it fast in the common case, and actually the Linux and glibc authors are doing a pretty good job here.
评论 #29660584 未加载
评论 #29660977 未加载
评论 #29661263 未加载
1vuio0pswjnm7over 3 years ago
The link to part 1 in part 2 seems to be incorrect.<p>Correct URL: <a href="https:&#x2F;&#x2F;kestrelcomputer.github.io&#x2F;kestrel&#x2F;2018&#x2F;01&#x2F;29&#x2F;on-elf" rel="nofollow">https:&#x2F;&#x2F;kestrelcomputer.github.io&#x2F;kestrel&#x2F;2018&#x2F;01&#x2F;29&#x2F;on-elf</a>
评论 #29660749 未加载
gbrown_over 3 years ago
Just submitting part 2 of this as I stumbled across it after having played around with write ELF files by hand. Never knew about the Hunk format and I think the author makes some interesting points.
评论 #29661824 未加载
spookthesunsetover 3 years ago
So is there a layman “intro to executable loader formats”. Like what are things to consider when designing a format?
评论 #29664590 未加载
cdubzzzover 3 years ago
Off topic — does anyone know more about what happened to the Kestrel project? It sounds from the note in the archived GitHub project[0] like the maintainer shut it down because a company released a similar product with the same name. Seems odd (and sad).<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;KestrelComputer&#x2F;kestrel" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;KestrelComputer&#x2F;kestrel</a>
评论 #29661863 未加载
评论 #29663292 未加载
cmrdporcupineover 3 years ago
Reminds me that I have an unfinished project to write a 68k ELF binary loader for the Atari ST that I never finished. Now that I&#x27;ve quit my job maybe I can return to this.<p>Beats cleaning the garage.
celeducover 3 years ago
&gt; &quot;the big mistakes from Unix, besides the X Window System&quot;<p>The entire X11 system was &quot;a mistake&quot;. Got it, we should have stuck to 7-bit text on a VT-100 because that was utter perfection.<p>With that compelling intro I lost any interest in any other arguments the author presented.
评论 #29662427 未加载
评论 #29663997 未加载
SleekEagleover 3 years ago
Not going to lie, I thought this was going to be opining on the Christmas movie Elf
baobrienover 3 years ago
(2018)