rCore
Based on rCore-Tutorial-Guide 2023 春季学期 and rCore-Tutorial-Book 第三版
Useful Command
To show platforms based on RISC-V that rustc supports
|
|
Rust Note
Cross Build (RISC-V)
.cargo/.config
[build]
target = "riscv64gc-unknown-none-elf"
No Std
Besides remove std section, you can refer to smallest no std - The Embedonomicon.
Notes
Linker Script
linker script specifications: info ld Scripts
or you can read in Emacs(C-h i
)
Toolings
strace
file
show file formatstat
show file/directory status (and size & blocks & Inode & … information)readelf
ELF file informationreadelf -W -S <executable>
show all the sections of a executable (for instance, `.text`, `.data`) (rust-readobj --section-headers <executable>
can also show sections header information of a executable)cargo-binutils analysis binary installation:
1 2
cargo install cargo-binutils rustup component add llvm-tools-preview
- show the heading information of a executable file
rust-readobj -h <executable>
- reverse engineering of a executable file
rust-objdump -S <executable>
- show the heading information of a executable file