1 #![no_std] 2 #![feature(allocator_api)] 3 #![feature(core_intrinsics)] 4 #![feature(linkage)] 5 #![feature(c_variadic)] 6 #![feature(naked_functions)] 7 #![feature(start)] 8 #![feature(thread_local)] 9 #![allow(non_camel_case_types)] 10 #![allow(non_upper_case_globals)] 11 #![feature(lang_items)] 12 13 #[macro_use] 14 extern crate alloc; 15 16 #[macro_use] 17 pub mod macros; 18 19 #[macro_use] 20 extern crate memoffset; 21 22 //TODO: fix this: adjust to dragonos sc 23 #[cfg(target_os = "dragonos")] 24 #[macro_use] 25 extern crate dsc; 26 27 use crate::platform::allocator::{Allocator, NEWALLOCATOR}; 28 29 pub mod header; 30 pub mod ld_so; 31 pub mod platform; 32 pub mod start; 33 pub mod fs; 34 pub mod sync; 35 pub mod c_str; 36 pub mod c_vec; 37 pub mod crt0; 38 39 mod io; 40 41 #[global_allocator] 42 static ALLOCATOR: Allocator = NEWALLOCATOR; 43 44 use core::panic::PanicInfo; 45 46 #[lang = "eh_personality"] 47 extern "C" fn eh_personality() {} 48 49 // #[cfg(not(target_os = "linux"))] 50 //#[no_mangle] 51 #[panic_handler] 52 fn panic_handle_func(info: &PanicInfo) -> ! { 53 loop {} 54 } 55