mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Improve headings
This commit is contained in:
@@ -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
|
||||
|
||||
### `nm`
|
||||
### List Symbols using `nm`
|
||||
|
||||
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:
|
||||
@@ -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.
|
||||
|
||||
### `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.
|
||||
|
||||
|
||||
@@ -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`:
|
||||
|
||||
[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
|
||||
❯ rust-objdump -h target/x86_64-unknown-none/debug/kernel
|
||||
|
||||
Reference in New Issue
Block a user