TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Bootstrapping from Hex to Bison to GCC

103 点作者 z29LiTp5qUC30n大约 4 年前

7 条评论

markjenkinswpg大约 4 年前
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>
userbinator大约 4 年前
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 未加载
XorNot大约 4 年前
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 未加载
siraben大约 4 年前
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>
Aissen大约 4 年前
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>
fjfaase大约 4 年前
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 未加载
choeger大约 4 年前
So, how about the kernel, eh? ;)
评论 #27036214 未加载