| #![no_core] | |
| #![crate_type = "cdylib"] | |
| #![feature(no_core, lang_items, allocator_internals, rustc_attrs)] | |
| #![needs_allocator] | |
| #![allow(internal_features)] | |
| extern crate minicore; | |
| use minicore::*; | |
| #[rustc_std_internal_symbol] | |
| unsafe fn __rust_alloc(_size: usize, _align: usize) -> *mut u8 { | |
| 0 as *mut u8 | |
| } | |
| unsafe extern "Rust" { | |
| #[rustc_std_internal_symbol] | |
| fn __rust_alloc_error_handler(size: usize, align: usize) -> !; | |
| } | |
| #[rustc_std_internal_symbol] | |
| pub unsafe fn __rdl_alloc_error_handler(_size: usize, _align: usize) -> ! { | |
| loop {} | |
| } | |
| #[used] | |
| static mut BUF: [u8; 1024] = [0; 1024]; | |
| #[unsafe(no_mangle)] | |
| extern "C" fn init() { | |
| unsafe { | |
| __rust_alloc_error_handler(0, 0); | |
| } | |
| } |