From a79bef22433cfcb9b001435da922a40f555d6051 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 28 Mar 2022 13:24:01 +0800 Subject: [PATCH] runtime: provide/fix more libc mem functions --- src/runtime/src/kernel/api.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/runtime/src/kernel/api.rs b/src/runtime/src/kernel/api.rs index a44ab6e..1d92761 100644 --- a/src/runtime/src/kernel/api.rs +++ b/src/runtime/src/kernel/api.rs @@ -199,7 +199,10 @@ pub fn resolve(required: &[u8]) -> Option { api!(__aeabi_memclr), // libc - api!(memcmp, extern { fn memcmp(a: *const u8, b: *mut u8, size: usize); }), + api!(memcpy, extern { fn memcpy(dest: *mut u8, src: *const u8, n: usize) -> *mut u8; }), + api!(memmove, extern { fn memmove(dest: *mut u8, src: *const u8, n: usize) -> *mut u8; }), + api!(memset, extern { fn memset(s: *mut u8, c: i32, n: usize) -> *mut u8; }), + api!(memcmp, extern { fn memcmp(s1: *const u8, s2: *const u8, n: usize) -> i32; }), // exceptions api!(_Unwind_Resume = unwind::_Unwind_Resume),