mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
freestanding-rust-binary: small improves (#471)
This commit is contained in:
committed by
Philipp Oppermann
parent
b30c3f653e
commit
36d56438a2
@@ -194,7 +194,7 @@ You might notice that we removed the `main` function. The reason is that a `main
|
||||
The entry point convention depends on your operating system. I recommend you to read the Linux section even if you're on a different OS because we will use this convention for our kernel.
|
||||
|
||||
#### Linux
|
||||
On Linux, the default entry point is called `_start`. The linker just looks for a function with that name and sets this function as entry point the executable. So to overwrite the entry point, we define our own `_start` function:
|
||||
On Linux, the default entry point is called `_start`. The linker just looks for a function with that name and sets this function as entry point to the executable. So, to overwrite the entry point, we define our own `_start` function:
|
||||
|
||||
```rust
|
||||
#[no_mangle]
|
||||
|
||||
Reference in New Issue
Block a user