blob: 7ece64b802f60ab997d099bec571ef665dfab926 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#![no_std]
#![no_main]
use rv64i_linux_user_no_std::{eprintln, println, sys};
fn main() {
println!("Hello {} from rust main().", 1337);
}
#[no_mangle]
pub extern "C" fn _start() -> ! {
main();
sys::exit(0);
}
#[panic_handler]
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
eprintln!("{}", info);
sys::exit(42);
}
// Since we disable the atomic isa extension, the compiler emits calls to software emulation. We
// provide the stub to make the linker happy for now.
#[no_mangle]
pub fn __atomic_load_8() {
panic!("__atomic_load_8 not implemented!");
}
|