Runtime support for CFI
Control Flow Integrity support in bionic.
General design:
http://clang.llvm.org/docs/ControlFlowIntegrityDesign.html#shared-library-support
This CL implements subsections "CFI Shadow" and "CFI_SlowPath" in the above document.
Bug: 22033465
Test: bionic device tests
Change-Id: I14dfea630de468eb5620e7f55f92b1397ba06217
diff --git a/tests/libs/Android.bp b/tests/libs/Android.bp
index 4cd991a..330f17e 100644
--- a/tests/libs/Android.bp
+++ b/tests/libs/Android.bp
@@ -24,7 +24,8 @@
relative_install_path: "bionic-loader-test-libs",
gtest: false,
sanitize: {
- never: true,
+ address: false,
+ coverage: false,
},
target: {
darwin: {
@@ -474,3 +475,21 @@
"libutils",
],
}
+
+cc_test_library {
+ name: "libcfi-test",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["cfi_test_lib.cpp"],
+ sanitize: {
+ cfi: false,
+ },
+}
+
+cc_test_library {
+ name: "libcfi-test-bad",
+ defaults: ["bionic_testlib_defaults"],
+ srcs: ["cfi_test_bad_lib.cpp"],
+ sanitize: {
+ cfi: false,
+ },
+}