mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
@@ -132,11 +132,10 @@ We add the following build-related entries:
|
||||
|
||||
|
||||
```json
|
||||
"linker-flavor": "ld",
|
||||
"linker": "ld.lld",
|
||||
"linker-flavor": "ld.lld",
|
||||
```
|
||||
|
||||
Instead of using the platform's default linker (which might not support Linux targets), we use the cross platform [LLD] linker for linking our kernel.
|
||||
Instead of using the platform's default linker (which might not support Linux targets), we use the cross platform [LLD] linker for linking our kernel. LLD is shipped with Rust since the `2018-03-05` nightly.
|
||||
|
||||
[LLD]: https://lld.llvm.org/
|
||||
|
||||
@@ -260,10 +259,6 @@ Let's try it:
|
||||
Finished dev [unoptimized + debuginfo] target(s) in 0.29 secs
|
||||
```
|
||||
|
||||
(If you're getting a linking error because LLD could not be found, see our “[Installing LLD]” guide.)
|
||||
|
||||
[Installing LLD]: ./second-edition/extra/installing-lld/index.md
|
||||
|
||||
It worked! We see that `xargo` cross-compiled the `core` library for our new custom target and then continued to compile our `blog_os` crate.
|
||||
|
||||
Now we are able to build our kernel for a bare metal target. However, our `_start` entry point, which will be called by the boot loader, is still empty. So let's output something to screen from it.
|
||||
|
||||
Reference in New Issue
Block a user