Closed lulf closed 2 years ago
minified:
#![no_main]
#![no_std]
use core::{cmp::Ordering, panic::PanicInfo};
#[no_mangle]
fn _start() -> usize {
fun as usize
}
fn fun(a: &str, b: &str) -> bool {
if a.len() == 4 && b.len() == 4 {
a.cmp(b) == Ordering::Equal
} else {
false
}
}
#[panic_handler]
fn panic(_: &PanicInfo) -> ! {
loop {}
}
$ cargo call-stack --bin app --target thumbv7m-none-eabi
thread 'main' panicked at 'BUG: callee `memcmp` is unknown', src/main.rs:741:25
the LLVM IR contains a call i32 @memcmp(blah blah)
but the machine code does not contain the memcmp
symbol because the IR was directly lowered to machine code.
With the latest version (0.1.10), and from the main branch, I'm getting this error when running call-stack:
Example reproducer: