Merge "Add aliases for backtrace related options."
diff --git a/libc/Android.bp b/libc/Android.bp
index 6442bc9..3b8507e 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -2272,6 +2272,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"],
@@ -2283,6 +2287,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",
],
diff --git a/libc/include/execinfo.h b/libc/include/execinfo.h
index 347ae92..88f4ae7 100644
--- a/libc/include/execinfo.h
+++ b/libc/include/execinfo.h
@@ -47,7 +47,7 @@
*
* Available since API level 33.
*/
-int backtrace(void** buffer, int size) __INTRODUCED_IN(33);
+int backtrace(void* _Nonnull * _Nonnull buffer, int size) __INTRODUCED_IN(33);
/**
* [backtrace_symbols(3)](https://man7.org/linux/man-pages/man3/backtrace_symbols.3.html)
@@ -59,7 +59,7 @@
*
* Available since API level 33.
*/
-char** backtrace_symbols(void* const* buffer, int size) __INTRODUCED_IN(33);
+char* _Nullable * _Nullable backtrace_symbols(void* _Nonnull const* _Nonnull buffer, int size) __INTRODUCED_IN(33);
/**
* [backtrace_symbols_fd(3)](https://man7.org/linux/man-pages/man3/backtrace_symbols_fd.3.html)
@@ -69,6 +69,6 @@
*
* Available since API level 33.
*/
-void backtrace_symbols_fd(void* const* buffer, int size, int fd) __INTRODUCED_IN(33);
+void backtrace_symbols_fd(void* _Nonnull const* _Nonnull buffer, int size, int fd) __INTRODUCED_IN(33);
__END_DECLS
diff --git a/libc/include/termios.h b/libc/include/termios.h
index e3f388c..92ac24b 100644
--- a/libc/include/termios.h
+++ b/libc/include/termios.h
@@ -49,19 +49,19 @@
* [cfgetispeed(3)](http://man7.org/linux/man-pages/man3/cfgetispeed.3.html)
* returns the terminal input baud rate.
*/
-speed_t cfgetispeed(const struct termios* __t) __INTRODUCED_IN(21);
+speed_t cfgetispeed(const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
/**
* [cfgetospeed(3)](http://man7.org/linux/man-pages/man3/cfgetospeed.3.html)
* returns the terminal output baud rate.
*/
-speed_t cfgetospeed(const struct termios* __t) __INTRODUCED_IN(21);
+speed_t cfgetospeed(const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
/**
* [cfmakeraw(3)](http://man7.org/linux/man-pages/man3/cfmakeraw.3.html)
* configures the terminal for "raw" mode.
*/
-void cfmakeraw(struct termios* __t) __INTRODUCED_IN(21);
+void cfmakeraw(struct termios* _Nonnull __t) __INTRODUCED_IN(21);
/**
* [cfsetspeed(3)](http://man7.org/linux/man-pages/man3/cfsetspeed.3.html)
@@ -69,7 +69,7 @@
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*/
-int cfsetspeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetspeed(struct termios* _Nonnull __t, speed_t __speed) __INTRODUCED_IN(21);
/**
* [cfsetispeed(3)](http://man7.org/linux/man-pages/man3/cfsetispeed.3.html)
@@ -77,7 +77,7 @@
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*/
-int cfsetispeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetispeed(struct termios* _Nonnull _t, speed_t __speed) __INTRODUCED_IN(21);
/**
* [cfsetospeed(3)](http://man7.org/linux/man-pages/man3/cfsetospeed.3.html)
@@ -85,7 +85,7 @@
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*/
-int cfsetospeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetospeed(struct termios* _Nonnull __t, speed_t __speed) __INTRODUCED_IN(21);
/**
* [tcdrain(3)](http://man7.org/linux/man-pages/man3/tcdrain.3.html)
@@ -120,7 +120,7 @@
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*/
-int tcgetattr(int __fd, struct termios* __t) __INTRODUCED_IN(21);
+int tcgetattr(int __fd, struct termios* _Nonnull __t) __INTRODUCED_IN(21);
/**
* [tcgetsid(3)](http://man7.org/linux/man-pages/man3/tcgetsid.3.html)
@@ -145,7 +145,7 @@
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*/
-int tcsetattr(int __fd, int __optional_actions, const struct termios* __t) __INTRODUCED_IN(21);
+int tcsetattr(int __fd, int __optional_actions, const struct termios* _Nonnull __t) __INTRODUCED_IN(21);
#endif