From cef44163bc35624e475caae7e104817086db8766 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 5 Feb 2018 18:25:31 +0100 Subject: [PATCH] Remove/resolve some todos --- .../posts/01-freestanding-rust-binary/index.md | 8 ++------ .../second-edition/posts/02-minimal-rust-kernel/index.md | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/blog/content/second-edition/posts/01-freestanding-rust-binary/index.md b/blog/content/second-edition/posts/01-freestanding-rust-binary/index.md index 055b28eb..ee51d3ed 100644 --- a/blog/content/second-edition/posts/01-freestanding-rust-binary/index.md +++ b/blog/content/second-edition/posts/01-freestanding-rust-binary/index.md @@ -12,10 +12,6 @@ This post describes how to create a Rust executable that does not link the stand -TODO github, issues, comments, etc - -TODO build for x86_64-unknown-linux-gnu? Or use platform specific binary inspection tools (e.g. objdump on linux, xxx on Windows and yyy on Mac)? - ## Introduction To write an operating system kernel, we need code that does not depend on any operating system features. This means that we can't use threads, files, heap memory, the network, random numbers, standard output, or any other features requiring OS abstractions or specific hardware. Which makes sense, since we're trying to write our own OS and our own drivers. @@ -146,7 +142,7 @@ The function signature is taken from the [unstable Rust book]. The signature isn [unstable Rust book]: https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib -TODO: Implement the stable panic mechanism once is implemented +Note that there is already an accepted RFC for a stable panic mechnism, which is only waiting for an implementation. See the [tracking issue](https://github.com/rust-lang/rust/issues/44489) for more information. Instead of implementing the second language item, `eh_personality`, we remove the need for it by disabling unwinding. @@ -295,7 +291,7 @@ A minimal freestanding Rust binary looks like this: #![no_main] // disable all Rust-level entry points #[lang = "panic_fmt"] // define a function that should be called on panic -#[no_mangle] // TODO required? +#[no_mangle] pub extern fn rust_begin_panic(_msg: core::fmt::Arguments, _file: &'static str, _line: u32, _column: u32) -> ! { diff --git a/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md b/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md index b5f89ef7..b9a84fe2 100644 --- a/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md +++ b/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md @@ -48,9 +48,8 @@ Writing a bootloader is a bit cumbersome as it requires assembly language and a [bootimage]: https://github.com/phil-opp/bootimage -If you are interested in building your own bootloader, check out our “[Booting]” posts, where we explain in detail how a bootloader is built. +If you are interested in building your own bootloader: Stay tuned, a set of posts on this topic is already planned! -[Booting]: TODO ### The Multiboot Standard