操作系统2022版实验
sotinyatgithub / os2022exps Goto Github PK
View Code? Open in Web Editor NEW操作系统2022版实验
操作系统2022版实验
编译命令修改为
cargo build --target aarch64-unknown-none-softfloat.json
项目目录下新建.cargo/config.toml文件,内容如下
[unstable]
build-std = ["core", "compiler_builtins"]
原先编译命令
cargo build --target aarch64-unknown-none-softfloat
会报错如下:
error: linking with
rust-lld
failed: exit status: 1
|
= note: "rust-lld" "-flavor" "gnu" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.358o59hkt7efruo.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.4t21rnm557dy8f08.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.51shtnl9jrmqr2vu.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.5a7lwex1qifr7uk6.rcgu.o" "--as-needed" "-L" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps" "-L" "/home/yuanzhiqiu/os/yzqos_armv8/target/debug/deps" "-L" "/home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib" "-Bstatic" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/librustc_std_workspace_core-1dcf6d93b6d407a2.rlib" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/libcore-1bf904a56375861d.rlib" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/libcompiler_builtins-4f3ab19918958b56.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "/home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib" "-o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276" "--gc-sections"
= note: rust-lld: error: undefined symbol: LD_STACK_PTR
>>> referenced by 5a7lwex1qifr7uk6
>>> /home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.5a7lwex1qifr7uk6.rcgu.o:(.text.boot+0x18)error: could not compile
yzqos_armv8
due to previous error
修改编译命令但不新增.cargo/config.toml文件的话报错如下:
cargo build --target aarch64-unknown-none-softfloat.json
Compiling yzqos_armv8 v0.1.0 (/home/yuanzhiqiu/os/yzqos_armv8)
warning: target json file contains unused fields: abi-blacklisterror[E0461]: couldn't find crate
core
with expected target triple aarch64-unknown-none-softfloat-5103292167306961306
|
= note: the following crate versions were found:
cratecore
, target triple aarch64-unknown-none-softfloat: /home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib/libcore-ac4407b588a64e53.rlibwarning:
yzqos_armv8
(bin "yzqos_armv8") generated 1 warning
error: could not compileyzqos_armv8
due to previous error; 1 warning emitted
关于编译命令,想更为方便的话,可以如下配置:
.cargo/config.toml文件中添加内容:
[build]
target = "aarch64-unknown-none-softfloat.json"
则编译命令只需
cargo build
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.