aboutsummaryrefslogtreecommitdiffstats
path: root/halt/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'halt/src/main.rs')
-rw-r--r--halt/src/main.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/halt/src/main.rs b/halt/src/main.rs
new file mode 100644
index 0000000..8abf38a
--- /dev/null
+++ b/halt/src/main.rs
@@ -0,0 +1,26 @@
+#![no_std]
+#![no_main]
+#![feature(start)]
+//#![feature(asm)]
+//#![link_args = "-L -lmain"]
+
+#[panic_handler]
+fn panic(_info: &core::panic::PanicInfo) -> ! {
+ loop {}
+}
+
+#[no_mangle]
+pub unsafe extern "C" fn main() {
+ exit(0x69);
+}
+
+#[link(name="pintos", kind="static")]
+extern {
+ fn exit(status: i32);
+}
+
+//#[no_mangle]
+//#[start]
+//unsafe extern "C" fn _start() {
+// exit(main());
+//}