librust_baremetal: Add memcpy_chk
Add __memcpy_chk (used by BoringSSL) and start documenting the
dependencies that the baremetal environment needs to provide to
successfully link the library.
Bug: 256148034
Bug: 256827715
Test: m pvmfw_bin && atest vmbase_example.integration_test
Change-Id: I0d61f4efc5cc26a95b74870be7cd7eebeeb0bd3a
diff --git a/libc/Android.bp b/libc/Android.bp
index bf80a84..864090b 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -2263,6 +2263,10 @@
// libc dependencies for baremetal Rust projects.
// ========================================================
+// This library contains the following unresolved symbols:
+// __errno
+// abort
+// async_safe_fatal_va_list
cc_library_static {
name: "librust_baremetal",
header_libs: ["libc_headers"],
@@ -2274,6 +2278,17 @@
"-Wall",
"-Werror",
],
+ srcs: [
+ "bionic/fortify.cpp",
+ ],
+ arch: {
+ arm64: {
+ cflags: ["-DHAVE_ASSEMBLER___MEMCPY_CHK"],
+ srcs: [
+ "arch-arm64/string/__memcpy_chk.S",
+ ],
+ },
+ },
whole_static_libs: [
"libarm-optimized-routines-mem",
],