Reapply usage of LLD shipped with Rust

This reverts commit f24ba8b799.
This commit is contained in:
Philipp Oppermann
2018-03-06 18:32:54 +01:00
parent 02941fe5d3
commit 844f0f0051
5 changed files with 4 additions and 47 deletions

View File

@@ -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.