Improve headings

This commit is contained in:
Philipp Oppermann
2023-12-28 17:59:13 +01:00
parent 2676d69c31
commit 9080e69a09
2 changed files with 3 additions and 3 deletions

View File

@@ -445,7 +445,7 @@ Afterwards, you can run the tools through `rust-nm`, `rust-objdump`, and `rust-s
[`cargo-binutils`]: https://github.com/rust-embedded/cargo-binutils [`cargo-binutils`]: https://github.com/rust-embedded/cargo-binutils
### `nm` ### List Symbols using `nm`
We defined a `_start` function as the entry point of our kernel. We defined a `_start` function as the entry point of our kernel.
To verify that it is properly exposed in the executable, we can run `nm` to list all the symbols defined in the executable: To verify that it is properly exposed in the executable, we can run `nm` to list all the symbols defined in the executable:
@@ -463,7 +463,7 @@ If we comment out the `_start` function or if we remove the `#[no_mangle]` attri
This way we can ensure that we set the `_start` function correctly. This way we can ensure that we set the `_start` function correctly.
### `objdump` ### Inspect ELF File using `objdump`
The `objdump` tool can inspect different parts of executables that use the [ELF file format]. This is the file format that the `x86_64-unknown-none` target uses, so we can use `objdump` to inspect our kernel executable. The `objdump` tool can inspect different parts of executables that use the [ELF file format]. This is the file format that the `x86_64-unknown-none` target uses, so we can use `objdump` to inspect our kernel executable.

View File

@@ -292,7 +292,7 @@ There are a few notable things:
To verify that the `entry_point` macro worked as expected, we can use the `objdump` tool as [described in the previous post][objdump-prev]. First, we recompile using `cargo build --target x86_64-unknown-none`, then we inspect the section headers using `objdump` or `rust-objdump`: To verify that the `entry_point` macro worked as expected, we can use the `objdump` tool as [described in the previous post][objdump-prev]. First, we recompile using `cargo build --target x86_64-unknown-none`, then we inspect the section headers using `objdump` or `rust-objdump`:
[objdump-prev]: @/edition-3/posts/01-minimal-kernel/index.md#objdump [objdump-prev]: @/edition-3/posts/01-minimal-kernel/index.md#inspect-elf-file-using-objdump
```bash,hl_lines=8 ```bash,hl_lines=8
rust-objdump -h target/x86_64-unknown-none/debug/kernel rust-objdump -h target/x86_64-unknown-none/debug/kernel