mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-19 23:57:48 +00:00
The no_mangle attribute is unsafe since Rust 2024
This commit is contained in:
@@ -309,7 +309,7 @@ Now we can try to access some memory outside our kernel:
|
||||
```rust
|
||||
// in src/main.rs
|
||||
|
||||
#[no_mangle]
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
println!("Hello World{}", "!");
|
||||
|
||||
@@ -367,7 +367,7 @@ Let's try to take a look at the page tables that define how our kernel is mapped
|
||||
```rust
|
||||
// in src/main.rs
|
||||
|
||||
#[no_mangle]
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn _start() -> ! {
|
||||
println!("Hello World{}", "!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user