From 2db35d063f9aa9abc21220021a68d49ff7d68cbd Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 5 Aug 2019 14:44:23 +0200 Subject: [PATCH] define bcmp other solution might be defining a non-linux target --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 3e6edef..dcaee12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,11 @@ mod eth; use crate::regs::{RegisterR, RegisterW}; use crate::cortex_a9::{asm, regs::*, mmu}; +#[no_mangle] +pub unsafe extern "C" fn bcmp(s1: *const u8, s2: *const u8, n: usize) -> i32 { + compiler_builtins::mem::memcmp(s1, s2, n) +} + extern "C" { static mut __bss_start: u32; static mut __bss_end: u32;