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.

Bootstrapping from Hex to Bison to GCC

103 pointsby z29LiTp5qUC30nabout 4 years ago

7 comments

markjenkinswpgabout 4 years ago
Nice work Fossy and co.<p>I believe this is this is the dependency chain your live-bootstrap works through: <a href="https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;talk-notes&#x2F;raw&#x2F;master&#x2F;live-bootstrap.pdf" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;talk-notes&#x2F;raw&#x2F;master&#x2F;live-bootst...</a>
userbinatorabout 4 years ago
See also Bellard&#x27;s TCCBOOT, which is based on the far simpler TCC instead of GCC: <a href="https:&#x2F;&#x2F;bellard.org&#x2F;tcc&#x2F;tccboot.html" rel="nofollow">https:&#x2F;&#x2F;bellard.org&#x2F;tcc&#x2F;tccboot.html</a>
评论 #27034738 未加载
评论 #27036241 未加载
评论 #27033067 未加载
XorNotabout 4 years ago
This is cool as heck. Outside of architectural attacks, this seems like a practical response to Reflections on Trusting Trust (<a href="http:&#x2F;&#x2F;users.ece.cmu.edu&#x2F;~ganger&#x2F;712.fall02&#x2F;papers&#x2F;p761-thompson.pdf" rel="nofollow">http:&#x2F;&#x2F;users.ece.cmu.edu&#x2F;~ganger&#x2F;712.fall02&#x2F;papers&#x2F;p761-thom...</a>).<p>While we can definitely discuss whether it&#x27;s practical for anyone to actually audit all that source code (no it is not), proving a 356 bytes codestream isn&#x27;t malicious seems like a good foundation to argue about.
评论 #27033319 未加载
sirabenabout 4 years ago
See also blynn-compiler[0], made by the same contributors, that bootstrap a Haskell compiler from C (which in term is bootstrapped from hex).<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;blynn-compiler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;blynn-compiler</a>
Aissenabout 4 years ago
See this doc for how the full process works: <a href="https:&#x2F;&#x2F;github.com&#x2F;fosslinux&#x2F;live-bootstrap&#x2F;blob&#x2F;master&#x2F;parts.rst" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fosslinux&#x2F;live-bootstrap&#x2F;blob&#x2F;master&#x2F;part...</a><p>In particular, this the very first step: <a href="https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;stage0-posix&#x2F;blob&#x2F;master&#x2F;x86&#x2F;hex0_x86.hex0" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;stage0-posix&#x2F;blob&#x2F;master&#x2F;x86&#x2F;hex0...</a> (or its hand-edited binary version ?)<p>Edit: this how it&#x27;s &quot;assembled&quot;:<p><pre><code> sed &#x27;s&#x2F;[;#].*$&#x2F;&#x2F;g&#x27; $input_file | xxd -r -p &gt; $output_file </code></pre> See: <a href="https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;bootstrap-seeds&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;bootstrap-seeds&#x2F;blob&#x2F;master&#x2F;READM...</a>
fjfaaseabout 4 years ago
I wonder if Brainfuck could be used for <a href="https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;stage0-posix" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;oriansj&#x2F;stage0-posix</a> ? It would not surprise me if there is no other language for which there are so many interpreters written in so many different programming languages. It is even possible to write a Brainfuck interpreter in Brainfuck, which can be verified. And there is also a Brainfuck interpreter written in x86-64: <a href="https:&#x2F;&#x2F;github.com&#x2F;316k&#x2F;brainfuck-x86-64" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;316k&#x2F;brainfuck-x86-64</a> . It is a little larger than hex0_x86.hex0 , but not too much to make it hard to verify.
评论 #27038154 未加载
评论 #27037188 未加载
choegerabout 4 years ago
So, how about the kernel, eh? ;)
评论 #27036214 未加载