diff --git a/Cargo.lock b/Cargo.lock
index 148ae426d1d45b3d429dbc80b70d20f9c4beb80f..072da425a4a3318d8839939d2fcd68fc75694873 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -82,9 +82,6 @@ dependencies = [
 [[package]]
 name = "crt0"
 version = "0.1.0"
-dependencies = [
- "relibc 0.1.0",
-]
 
 [[package]]
 name = "crti"
diff --git a/Makefile b/Makefile
index da3f4d01a025cc9836b6dddd113cba1dff142033..e00cde7121d2b464b94d2b87ecc646f8492e86fe 100644
--- a/Makefile
+++ b/Makefile
@@ -90,15 +90,15 @@ $(BUILD)/debug/librelibc.a: $(SRC)
 	touch $@
 
 $(BUILD)/debug/crt0.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/debug/crti.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crti/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crti/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/debug/crtn.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crtn/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --manifest-path src/crtn/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/release/librelibc.a: $(SRC)
@@ -106,15 +106,15 @@ $(BUILD)/release/librelibc.a: $(SRC)
 	touch $@
 
 $(BUILD)/release/crt0.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crt0/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/release/crti.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crti/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crti/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/release/crtn.o: $(SRC)
-	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crtn/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ $(RUSTCFLAGS)
+	CARGO_INCREMENTAL=0 $(CARGO) rustc --release --manifest-path src/crtn/Cargo.toml $(CARGOFLAGS) -- --emit obj=$@ -C panic=abort $(RUSTCFLAGS)
 	touch $@
 
 $(BUILD)/include: $(SRC)
diff --git a/src/crt0/Cargo.toml b/src/crt0/Cargo.toml
index 9b6c91a2bf4afecf46976043e5f2d2b43535ff19..8c4bfad227dd36ab3e8f8b97be14191946374931 100644
--- a/src/crt0/Cargo.toml
+++ b/src/crt0/Cargo.toml
@@ -6,6 +6,3 @@ authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 [lib]
 name = "crt0"
 crate-type = ["staticlib"]
-
-[dependencies]
-relibc = { path = "../.." }
diff --git a/src/crt0/src/lib.rs b/src/crt0/src/lib.rs
index 6b8c2552277a478744933ff330f7628236a9099f..85f1c5a1e4664bebcbc4d3ab1e0fc5eaebebcbbc 100644
--- a/src/crt0/src/lib.rs
+++ b/src/crt0/src/lib.rs
@@ -2,7 +2,6 @@
 
 #![no_std]
 #![feature(asm)]
-#![feature(core_intrinsics)]
 #![feature(linkage)]
 #![feature(naked_functions)]
 
@@ -29,6 +28,11 @@ pub unsafe extern "C" fn _start() {
 }
 
 #[panic_handler]
-unsafe fn panic(_pi: &::core::panic::PanicInfo) -> ! {
-    ::core::intrinsics::abort();
+#[linkage = "weak"]
+#[no_mangle]
+pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
+    extern "C" {
+        fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
+    }
+    relibc_panic(pi)
 }
diff --git a/src/crti/src/lib.rs b/src/crti/src/lib.rs
index 4f1d7a6ebaa50032cfd73e2abad8cf9d32f831a8..4a01af5009f3cd3aae0ccb6e113b753e1be9f711 100644
--- a/src/crti/src/lib.rs
+++ b/src/crti/src/lib.rs
@@ -1,7 +1,6 @@
 //! crti
 
 #![no_std]
-#![feature(core_intrinsics)]
 #![feature(global_asm)]
 #![feature(linkage)]
 
@@ -47,6 +46,11 @@ global_asm!(r#"
 "#);
 
 #[panic_handler]
-unsafe fn panic(_pi: &::core::panic::PanicInfo) -> ! {
-    ::core::intrinsics::abort();
+#[linkage = "weak"]
+#[no_mangle]
+pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
+    extern "C" {
+        fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
+    }
+    relibc_panic(pi)
 }
diff --git a/src/crtn/src/lib.rs b/src/crtn/src/lib.rs
index e62acc6531f157e625fc6cdaa4ac29e9be40c8d3..4462e5dd52ceb0cc22235c88afaa8d45366d8032 100644
--- a/src/crtn/src/lib.rs
+++ b/src/crtn/src/lib.rs
@@ -1,7 +1,6 @@
 //! crti
 
 #![no_std]
-#![feature(core_intrinsics)]
 #![feature(global_asm)]
 #![feature(linkage)]
 
@@ -37,6 +36,11 @@ global_asm!(r#"
 "#);
 
 #[panic_handler]
-unsafe fn panic(_pi: &::core::panic::PanicInfo) -> ! {
-    ::core::intrinsics::abort();
+#[linkage = "weak"]
+#[no_mangle]
+pub unsafe extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
+    extern "C" {
+        fn relibc_panic(pi: &::core::panic::PanicInfo) -> !;
+    }
+    relibc_panic(pi)
 }
diff --git a/src/lib.rs b/src/lib.rs
index 7cc40f81cd613a84091ac09a0cf91bd0b336726a..b3757e19094df7f6f7badd6d0ef2a6e19838200f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -58,11 +58,8 @@ use platform::{Allocator, Pal, Sys};
 #[global_allocator]
 static ALLOCATOR: Allocator = Allocator;
 
-#[cfg(not(test))]
-#[panic_handler]
-#[linkage = "weak"]
 #[no_mangle]
-pub extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
+pub extern "C" fn relibc_panic(pi: &::core::panic::PanicInfo) -> ! {
     use core::fmt::Write;
 
     let mut w = platform::FileWriter(2);
@@ -71,6 +68,14 @@ pub extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
     Sys::exit(1);
 }
 
+#[cfg(not(test))]
+#[panic_handler]
+#[linkage = "weak"]
+#[no_mangle]
+pub extern "C" fn rust_begin_unwind(pi: &::core::panic::PanicInfo) -> ! {
+    relibc_panic(pi)
+}
+
 #[cfg(not(test))]
 #[lang = "eh_personality"]
 #[no_mangle]