You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rCore_stu/ch2/user/src/lib.rs

13 lines
295 B
Rust

2 years ago
#![no_std]
#![feature(linkage)] // 开启弱链接特性
#![feature(panic_info_message)]
pub mod syscall;
pub mod user_lang_items;
pub use user_lang_items::*;
2 years ago
#[linkage = "weak"] // 设置我们默认的main函数, 弱链接
#[no_mangle]
fn main() -> i32 {
panic!("Cannot find main!");
}