mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Revert "LLD is now shipped with Rust!" (#397)
This commit is contained in:
committed by
GitHub
parent
c810448fc8
commit
f24ba8b799
@@ -132,10 +132,11 @@ We add the following build-related entries:
|
||||
|
||||
|
||||
```json
|
||||
"linker-flavor": "ld.lld",
|
||||
"linker-flavor": "ld",
|
||||
"linker": "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. LLD is shipped with Rust since the `2018-03-05` nightly.
|
||||
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]: https://lld.llvm.org/
|
||||
|
||||
@@ -259,6 +260,10 @@ 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