You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
549 B

  1. #![feature(lang_items)]
  2. #![no_std]
  3. extern crate rlibc;
  4. #[no_mangle]
  5. pub extern fn kernel_main() {
  6. //////////// !!! WARNING !!! ////////////
  7. // WE HAVE AN EXTREMELY SMALL STACK //
  8. // AND NO GUARD PAGE //
  9. /////////////////////////////////////////
  10. loop {}
  11. }
  12. #[lang = "eh_personality"]
  13. #[no_mangle]
  14. pub extern fn eh_personality() {}
  15. #[lang = "panic_fmt"]
  16. #[no_mangle]
  17. pub extern fn panic_fmt() -> ! {loop{}}
  18. #[allow(non_snake_case)]
  19. #[no_mangle]
  20. pub extern "C" fn _Unwind_Resume() -> ! {
  21. // we should hlt here
  22. loop {}
  23. }