From 2c48aacda0b22162f41f63860d14f4bbd85f6743 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Sat, 22 Mar 2025 07:36:00 +0100 Subject: [PATCH 1/5] remove #[no_mangle] from panic handler A recent change on rustc nightly broke panic handlers that also have the #[no_mangle] attribute. It looks like they don't consider this to be a bug. Let's just remove it. --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 57250c9c..2c72adfa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -370,7 +370,6 @@ fn enable_write_protect_bit() { } #[panic_handler] -#[no_mangle] pub fn panic(info: &PanicInfo) -> ! { use core::fmt::Write; write!(printer::Printer, "{}", info).unwrap(); From f1d0530320f8f20b0f93497f4636fc21989d84b9 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Sat, 22 Mar 2025 07:45:54 +0100 Subject: [PATCH 2/5] update changelog --- Changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index 5708e743..f810d5c4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # Unreleased +- [remove #[no_mangle] from panic handler](https://github.com/rust-osdev/bootloader/pull/500) + # 0.9.30 – 2025-02-10 - [change rustc-abi in custom targets to x86-softfloat](https://github.com/rust-osdev/bootloader/pull/492) From 050fde2b650ae1ccc458dc9d4210c3fb98de46ce Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Sat, 22 Mar 2025 07:49:59 +0100 Subject: [PATCH 3/5] release 0.9.31 --- Cargo.lock | 2 +- Cargo.toml | 2 +- Changelog.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 61d51144..99f51012 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bootloader" -version = "0.9.30" +version = "0.9.31" dependencies = [ "bit_field", "fixedvec", diff --git a/Cargo.toml b/Cargo.toml index 0b5bbfd7..a2172910 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bootloader" -version = "0.9.30" +version = "0.9.31" authors = ["Philipp Oppermann "] license = "MIT/Apache-2.0" description = "An experimental pure-Rust x86 bootloader." diff --git a/Changelog.md b/Changelog.md index f810d5c4..df54e95b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,7 @@ # Unreleased +# 0.9.31 – 2025-03-22 + - [remove #[no_mangle] from panic handler](https://github.com/rust-osdev/bootloader/pull/500) # 0.9.30 – 2025-02-10 From ba5c12460b08ed97472d27fc49252c1738bb7c8b Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 24 Mar 2025 10:38:37 +0100 Subject: [PATCH 4/5] Rename `.cargo/config` files of example and test kernel to `config.toml` --- example-kernel/.cargo/{config => config.toml} | 0 test-kernel/.cargo/{config => config.toml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename example-kernel/.cargo/{config => config.toml} (100%) rename test-kernel/.cargo/{config => config.toml} (100%) diff --git a/example-kernel/.cargo/config b/example-kernel/.cargo/config.toml similarity index 100% rename from example-kernel/.cargo/config rename to example-kernel/.cargo/config.toml diff --git a/test-kernel/.cargo/config b/test-kernel/.cargo/config.toml similarity index 100% rename from test-kernel/.cargo/config rename to test-kernel/.cargo/config.toml From 8bb91e53f39c8a032deb4ce474bbab30c1c4d69f Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 24 Mar 2025 10:45:50 +0100 Subject: [PATCH 5/5] Build example kernel with `-Zbuild-std-features=compiler-builtins-mem` --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5ef0f5b..53de4a22 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: - name: "Install Rustup Components" run: rustup component add rust-src llvm-tools-preview - name: 'Build Example Kernel' - run: cargo build -Zbuild-std=core + run: cargo build -Zbuild-std=core -Zbuild-std-features=compiler-builtins-mem working-directory: example-kernel