Skip to content

Instantly share code, notes, and snippets.

@tenpoku1000
Last active December 3, 2020 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenpoku1000/9e496e27f4ea85a4d30efe343607798c to your computer and use it in GitHub Desktop.
Save tenpoku1000/9e496e27f4ea85a4d30efe343607798c to your computer and use it in GitHub Desktop.
独自拡張 WebAssembly を生成し、UEFI アプリを出力するバックエンドを試作する

独自拡張 WebAssembly を生成し、UEFI アプリを出力するバックエンドを試作する

この記事は、自作OS Advent Calendar 2020の 12/05 の記事として書かれました。

WebAssembly から UEFI アプリを出力可能にするため、独自の再配置情報を付加した独自仕様の 64 ビット WebAssembly を定義して実装しています。

コンパイラのバックエンドのソースコードと実行可能ファイルは、以下のリポジトリからダウンロードできます。使い方は、README.md に書かれています。

tenpoku1000/PE_COFF: 独自 WASM64 を生成し、PE/COFF や PE32+(UEFI アプリ)に変換するバックエンド試作版
https://github.com/tenpoku1000/PE_COFF

現在開発中の C コンパイラのサブセットのフロントエンドが完成したら、バックエンドとともに、以下の電子書籍の第3章で解説する予定です。

tenpoku1000/tenpoku-book: 電子書籍: x64 UEFI 対応 OS 自作入門
https://github.com/tenpoku1000/tenpoku-book

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment