}
// ========================================================
+// libc_fortify.a - container for our FORITFY
+// implementation details
+// ========================================================
+cc_library_static {
+ defaults: ["libc_defaults"],
+ srcs: [
+ "bionic/__memcpy_chk.cpp",
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ "bionic/fortify.cpp",
+ ],
+
+ name: "libc_fortify",
+
+ // Disable FORTIFY for the compilation of these, so we don't end up having
+ // FORTIFY silently call itself.
+ cflags: ["-U_FORTIFY_SOURCE"],
+
+ arch: {
+ arm: {
+ srcs: [
+ "arch-arm/generic/bionic/__memcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__memcpy_chk.cpp",
+ ],
+ cortex_a7: {
+ srcs: [
+ "arch-arm/cortex-a7/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a7/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a53: {
+ srcs: [
+ "arch-arm/cortex-a53/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a53/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a53_a57: {
+ srcs: [
+ "arch-arm/cortex-a15/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a8: {
+ srcs: [
+ "arch-arm/cortex-a15/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a9: {
+ srcs: [
+ "arch-arm/cortex-a9/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a9/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a15: {
+ srcs: [
+ "arch-arm/cortex-a15/bionic/__strcat_chk.S",
+ "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ cortex_a73: {
+ srcs: [
+ "arch-arm/denver/bionic/__strcat_chk.S",
+ "arch-arm/denver/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ denver: {
+ srcs: [
+ "arch-arm/denver/bionic/__strcat_chk.S",
+ "arch-arm/denver/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ krait: {
+ srcs: [
+ "arch-arm/krait/bionic/__strcat_chk.S",
+ "arch-arm/krait/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ kryo: {
+ srcs: [
+ "arch-arm/krait/bionic/__strcat_chk.S",
+ "arch-arm/krait/bionic/__strcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__strcat_chk.cpp",
+ "bionic/__strcpy_chk.cpp",
+ ],
+ },
+ },
+ arm64: {
+ srcs: [
+ "arch-arm64/generic/bionic/__memcpy_chk.S",
+ ],
+ exclude_srcs: [
+ "bionic/__memcpy_chk.cpp",
+ ],
+ },
+ },
+}
+
+// ========================================================
// libc_bionic.a - home-grown C library code
// ========================================================
// debuggerd will look for the abort message in libc.so's copy.
"bionic/android_set_abort_message.cpp",
- "bionic/__memcpy_chk.cpp",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
"bionic/strchr.cpp",
"bionic/strnlen.c",
"bionic/strrchr.cpp",
"arch-arm/bionic/syscall.S",
"arch-arm/bionic/vfork.S",
],
- exclude_srcs: [
- "bionic/__memcpy_chk.cpp",
- ],
cortex_a7: {
srcs: [
"arch-arm/cortex-a7/bionic/memset.S",
"arch-arm/cortex-a7/bionic/memcpy.S",
- "arch-arm/cortex-a7/bionic/__strcat_chk.S",
- "arch-arm/cortex-a7/bionic/__strcpy_chk.S",
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/cortex-a15/bionic/strcat.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a53: {
srcs: [
"arch-arm/cortex-a53/bionic/memcpy.S",
- "arch-arm/cortex-a53/bionic/__strcat_chk.S",
- "arch-arm/cortex-a53/bionic/__strcpy_chk.S",
"arch-arm/cortex-a7/bionic/memset.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a53_a57: {
"arch-arm/cortex-a15/bionic/memset.S",
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/cortex-a15/bionic/strcat.S",
- "arch-arm/cortex-a15/bionic/__strcat_chk.S",
"arch-arm/cortex-a15/bionic/strcmp.S",
"arch-arm/cortex-a15/bionic/strcpy.S",
- "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
"arch-arm/cortex-a15/bionic/strlen.S",
"arch-arm/denver/bionic/memmove.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a8: {
"arch-arm/cortex-a15/bionic/memset.S",
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/cortex-a15/bionic/strcat.S",
- "arch-arm/cortex-a15/bionic/__strcat_chk.S",
"arch-arm/cortex-a15/bionic/strcmp.S",
"arch-arm/cortex-a15/bionic/strcpy.S",
- "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
"arch-arm/cortex-a15/bionic/strlen.S",
"arch-arm/denver/bionic/memmove.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a9: {
"arch-arm/cortex-a9/bionic/memset.S",
"arch-arm/cortex-a9/bionic/stpcpy.S",
"arch-arm/cortex-a9/bionic/strcat.S",
- "arch-arm/cortex-a9/bionic/__strcat_chk.S",
"arch-arm/cortex-a9/bionic/strcmp.S",
"arch-arm/cortex-a9/bionic/strcpy.S",
- "arch-arm/cortex-a9/bionic/__strcpy_chk.S",
"arch-arm/cortex-a9/bionic/strlen.S",
"arch-arm/denver/bionic/memmove.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a15: {
"arch-arm/cortex-a15/bionic/memset.S",
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/cortex-a15/bionic/strcat.S",
- "arch-arm/cortex-a15/bionic/__strcat_chk.S",
"arch-arm/cortex-a15/bionic/strcmp.S",
"arch-arm/cortex-a15/bionic/strcpy.S",
- "arch-arm/cortex-a15/bionic/__strcpy_chk.S",
"arch-arm/cortex-a15/bionic/strlen.S",
"arch-arm/denver/bionic/memmove.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
cortex_a73: {
"arch-arm/denver/bionic/memcpy.S",
"arch-arm/denver/bionic/memmove.S",
- "arch-arm/denver/bionic/__strcat_chk.S",
- "arch-arm/denver/bionic/__strcpy_chk.S",
"arch-arm/krait/bionic/strcmp.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
denver: {
"arch-arm/denver/bionic/memcpy.S",
"arch-arm/denver/bionic/memmove.S",
"arch-arm/denver/bionic/memset.S",
- "arch-arm/denver/bionic/__strcat_chk.S",
- "arch-arm/denver/bionic/__strcpy_chk.S",
// Use cortex-a15 versions of strcat/strcpy/strlen.
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
krait: {
"arch-arm/krait/bionic/memcpy.S",
"arch-arm/krait/bionic/memset.S",
"arch-arm/krait/bionic/strcmp.S",
- "arch-arm/krait/bionic/__strcat_chk.S",
- "arch-arm/krait/bionic/__strcpy_chk.S",
// Use cortex-a15 versions of strcat/strcpy/strlen.
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
kryo: {
"arch-arm/kryo/bionic/memcpy.S",
"arch-arm/cortex-a7/bionic/memset.S",
"arch-arm/krait/bionic/strcmp.S",
- "arch-arm/krait/bionic/__strcat_chk.S",
- "arch-arm/krait/bionic/__strcpy_chk.S",
// Use cortex-a15 versions of strcat/strcpy/strlen.
"arch-arm/cortex-a15/bionic/stpcpy.S",
"arch-arm/generic/bionic/strcmp.S",
"arch-arm/generic/bionic/strcpy.S",
"arch-arm/generic/bionic/strlen.c",
- "bionic/__strcat_chk.cpp",
- "bionic/__strcpy_chk.cpp",
],
},
},
"bionic/fgetxattr.cpp",
"bionic/flistxattr.cpp",
"bionic/flockfile.cpp",
- "bionic/fortify.cpp",
"bionic/fpclassify.cpp",
"bionic/fsetxattr.cpp",
"bionic/ftruncate.cpp",
whole_static_libs: [
"libc_bionic_ndk",
+ "libc_fortify",
"libc_freebsd",
"libc_freebsd_large_stack",
"libc_gdtoa",
"libc_bionic",
"libc_bionic_ndk",
"libc_dns",
+ "libc_fortify",
"libc_freebsd",
"libc_freebsd_large_stack",
"libc_gdtoa",