diff options
-rw-r--r-- | tests/no_std_build.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/no_std_build.rs b/tests/no_std_build.rs new file mode 100644 index 0000000..8a68214 --- /dev/null +++ b/tests/no_std_build.rs @@ -0,0 +1,24 @@ +// Verify that we can be linked against an appliction which only uses +// libcore, which is common in kernel space. + +#![feature(no_std, lang_items)] +#![no_std] + +extern crate x86; + +fn main() { +} + +// We want to supply these definitions ourselves, and not have them +// accidentally pulled in via the x86 crate. +#[lang = "eh_personality"] +extern "C" fn eh_personality() { +} + +#[lang = "panic_fmt"] +extern "C" fn panic_fmt( + args: ::core::fmt::Arguments, file: &str, line: usize) + -> ! +{ + loop {} +} |