diff --git a/src/lib.rs b/src/lib.rs index 444bb4d7..45cae2de 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,10 +57,15 @@ pub fn hlt_loop() -> ! { } } +#[cfg(test)] +use bootloader::{entry_point, BootInfo}; + +#[cfg(test)] +entry_point!(test_kernel_main); + /// Entry point for `cargo xtest` #[cfg(test)] -#[no_mangle] -pub extern "C" fn _start() -> ! { +fn test_kernel_main(_boot_info: &'static BootInfo) -> ! { init(); test_main(); hlt_loop();