Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2012 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | TEST_PATH := $(LOCAL_PATH)/.. |
| 19 | |
Dan Albert | 5341691 | 2015-08-10 16:40:06 -0700 | [diff] [blame] | 20 | common_cppflags := |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 21 | common_additional_dependencies := \ |
| 22 | $(LOCAL_PATH)/Android.mk \ |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 23 | $(LOCAL_PATH)/Android.build.dt_runpath.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 24 | $(LOCAL_PATH)/Android.build.dlext_testzip.mk \ |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 25 | $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk \ |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 26 | $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk \ |
| 27 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk \ |
| 28 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk \ |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 29 | $(LOCAL_PATH)/Android.build.pthread_atfork.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 30 | $(LOCAL_PATH)/Android.build.testlib.mk \ |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 31 | $(LOCAL_PATH)/Android.build.versioned_lib.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 32 | $(TEST_PATH)/Android.build.mk |
| 33 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 34 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b335677 | 2014-11-14 11:19:22 -0800 | [diff] [blame] | 35 | # Library to test gnu-styled hash |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 36 | # ----------------------------------------------------------------------------- |
| 37 | ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64)) |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 38 | libgnu-hash-table-library_src_files := \ |
| 39 | dlext_test_library.cpp \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 40 | |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 41 | libgnu-hash-table-library_ldflags := \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 42 | -Wl,--hash-style=gnu \ |
| 43 | |
Dmitriy Ivanov | ec18ce0 | 2014-11-09 19:27:20 -0800 | [diff] [blame] | 44 | module := libgnu-hash-table-library |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 45 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 46 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 47 | endif |
| 48 | |
| 49 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b335677 | 2014-11-14 11:19:22 -0800 | [diff] [blame] | 50 | # Library to test sysv-styled hash |
| 51 | # ----------------------------------------------------------------------------- |
| 52 | libsysv-hash-table-library_src_files := \ |
| 53 | dlext_test_library.cpp \ |
| 54 | |
| 55 | libsysv-hash-table-library_ldflags := \ |
| 56 | -Wl,--hash-style=sysv \ |
| 57 | |
| 58 | module := libsysv-hash-table-library |
| 59 | module_tag := optional |
| 60 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 61 | |
| 62 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 63 | # Library used by dlext tests - with GNU RELRO program header |
| 64 | # ----------------------------------------------------------------------------- |
| 65 | libdlext_test_src_files := \ |
| 66 | dlext_test_library.cpp \ |
| 67 | |
| 68 | libdlext_test_ldflags := \ |
| 69 | -Wl,-z,relro \ |
| 70 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 71 | libdlext_test_shared_libraries := libtest_simple |
| 72 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 73 | module := libdlext_test |
| 74 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 75 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 76 | |
| 77 | # ----------------------------------------------------------------------------- |
| 78 | # create symlink to libdlext_test.so for symlink test |
| 79 | # ----------------------------------------------------------------------------- |
| 80 | # Use = instead of := to defer the evaluation of $@ |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 81 | $(TARGET_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 82 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 83 | |
| 84 | ifneq ($(TARGET_2ND_ARCH),) |
| 85 | # link 64 bit .so |
| 86 | $(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 87 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 88 | endif |
| 89 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 90 | # host symlinks |
| 91 | $(HOST_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 92 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 93 | |
| 94 | $(HOST_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 95 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 96 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 97 | # ----------------------------------------------------------------------------- |
| 98 | # Library used by dlext tests - without GNU RELRO program header |
| 99 | # ----------------------------------------------------------------------------- |
| 100 | libdlext_test_norelro_src_files := \ |
| 101 | dlext_test_library.cpp \ |
| 102 | |
| 103 | libdlext_test_norelro_ldflags := \ |
| 104 | -Wl,-z,norelro \ |
| 105 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 106 | libdlext_test_norelro_shared_libraries := libtest_simple |
| 107 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 108 | module := libdlext_test_norelro |
| 109 | module_tag := optional |
| 110 | build_type := target |
| 111 | build_target := SHARED_LIBRARY |
| 112 | include $(TEST_PATH)/Android.build.mk |
| 113 | |
| 114 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 115 | # Library used by dlext tests - different name non-default location |
| 116 | # ----------------------------------------------------------------------------- |
| 117 | libdlext_test_fd_src_files := \ |
| 118 | dlext_test_library.cpp \ |
| 119 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 120 | libdlext_test_fd_shared_libraries := libtest_simple |
| 121 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 122 | libdlext_test_fd_install_to_out_data := true |
| 123 | module := libdlext_test_fd |
| 124 | module_tag := optional |
| 125 | build_type := target |
| 126 | build_target := SHARED_LIBRARY |
| 127 | include $(TEST_PATH)/Android.build.mk |
| 128 | |
Dmitriy Ivanov | 618f1a3 | 2015-03-17 20:06:36 -0700 | [diff] [blame] | 129 | # ---------------------------------------------------------------------------- |
| 130 | # Library with soname which does not match filename |
| 131 | # ---------------------------------------------------------------------------- |
| 132 | libdlext_test_different_soname_src_files := \ |
| 133 | dlext_test_library.cpp \ |
| 134 | |
| 135 | module := libdlext_test_different_soname |
| 136 | module_tag := optional |
| 137 | libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so |
| 138 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 139 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 140 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 141 | # Library used by dlext tests - zipped and aligned |
| 142 | # ----------------------------------------------------------------------------- |
| 143 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 144 | bionic_2nd_arch_prefix := |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 145 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 146 | ifneq ($(TARGET_2ND_ARCH),) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 147 | bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 148 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 149 | endif |
| 150 | |
| 151 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 152 | # Library used by dlfcn tests |
| 153 | # ----------------------------------------------------------------------------- |
| 154 | libtest_simple_src_files := \ |
| 155 | dlopen_testlib_simple.cpp |
| 156 | |
| 157 | module := libtest_simple |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 158 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 159 | |
Dmitriy Ivanov | d97e9f5 | 2014-06-29 12:28:37 -0700 | [diff] [blame] | 160 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1b20daf | 2014-05-19 15:06:58 -0700 | [diff] [blame] | 161 | # Library used by dlfcn nodelete tests |
| 162 | # ----------------------------------------------------------------------------- |
| 163 | libtest_nodelete_1_src_files := \ |
| 164 | dlopen_nodelete_1.cpp |
| 165 | |
| 166 | module := libtest_nodelete_1 |
| 167 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 168 | |
| 169 | # ----------------------------------------------------------------------------- |
| 170 | # Library used by dlfcn nodelete tests |
| 171 | # ----------------------------------------------------------------------------- |
| 172 | libtest_nodelete_2_src_files := \ |
| 173 | dlopen_nodelete_2.cpp |
| 174 | |
| 175 | module := libtest_nodelete_2 |
| 176 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 177 | |
| 178 | # ----------------------------------------------------------------------------- |
| 179 | # Library used by dlfcn nodelete tests |
| 180 | # ----------------------------------------------------------------------------- |
| 181 | libtest_nodelete_dt_flags_1_src_files := \ |
| 182 | dlopen_nodelete_dt_flags_1.cpp |
| 183 | |
| 184 | libtest_nodelete_dt_flags_1_ldflags := -Wl,-z,nodelete |
| 185 | |
| 186 | module := libtest_nodelete_dt_flags_1 |
| 187 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 188 | |
| 189 | # ----------------------------------------------------------------------------- |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 190 | # Build DT_RUNPATH test helper libraries |
| 191 | # ----------------------------------------------------------------------------- |
| 192 | include $(LOCAL_PATH)/Android.build.dt_runpath.mk |
| 193 | |
| 194 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 195 | # Build library with two parents |
| 196 | # ----------------------------------------------------------------------------- |
| 197 | include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk |
| 198 | |
| 199 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 200 | # Build libtest_check_order_dlsym.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 201 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 202 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 203 | |
| 204 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 205 | # Build libtest_check_order_siblings.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 206 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 207 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 208 | |
| 209 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 210 | # Build libtest_check_order_root.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 211 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 212 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 213 | |
| 214 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 215 | # Build libtest_versioned_lib.so with its dependencies. |
| 216 | # ----------------------------------------------------------------------------- |
| 217 | include $(LOCAL_PATH)/Android.build.versioned_lib.mk |
| 218 | |
| 219 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 220 | # Build libraries needed by pthread_atfork tests |
| 221 | # ----------------------------------------------------------------------------- |
| 222 | include $(LOCAL_PATH)/Android.build.pthread_atfork.mk |
| 223 | |
| 224 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 225 | # Library with dependency loop used by dlfcn tests |
| 226 | # |
| 227 | # libtest_with_dependency_loop -> a -> b -> c -> a |
| 228 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 229 | libtest_with_dependency_loop_src_files := dlopen_testlib_loopy_root.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 230 | |
| 231 | libtest_with_dependency_loop_shared_libraries := \ |
| 232 | libtest_with_dependency_loop_a |
| 233 | |
| 234 | module := libtest_with_dependency_loop |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 235 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 236 | |
| 237 | # ----------------------------------------------------------------------------- |
| 238 | # libtest_with_dependency_loop_a.so |
| 239 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 240 | libtest_with_dependency_loop_a_src_files := dlopen_testlib_loopy_a.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 241 | |
| 242 | libtest_with_dependency_loop_a_shared_libraries := \ |
| 243 | libtest_with_dependency_loop_b_tmp |
| 244 | |
| 245 | module := libtest_with_dependency_loop_a |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 246 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 247 | |
| 248 | # ----------------------------------------------------------------------------- |
| 249 | # libtest_with_dependency_loop_b.so |
| 250 | # |
| 251 | # this is temporary placeholder - will be removed |
| 252 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 253 | libtest_with_dependency_loop_b_tmp_src_files := dlopen_testlib_loopy_invalid.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 254 | libtest_with_dependency_loop_b_tmp_ldflags := -Wl,-soname=libtest_with_dependency_loop_b.so |
| 255 | |
| 256 | module := libtest_with_dependency_loop_b_tmp |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 257 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 258 | |
| 259 | # ----------------------------------------------------------------------------- |
| 260 | # libtest_with_dependency_loop_b.so |
| 261 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 262 | libtest_with_dependency_loop_b_src_files := dlopen_testlib_loopy_b.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 263 | libtest_with_dependency_loop_b_shared_libraries := libtest_with_dependency_loop_c |
| 264 | |
| 265 | module := libtest_with_dependency_loop_b |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 266 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 267 | |
| 268 | # ----------------------------------------------------------------------------- |
| 269 | # libtest_with_dependency_loop_c.so |
| 270 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 271 | libtest_with_dependency_loop_c_src_files := dlopen_testlib_loopy_c.cpp |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 272 | |
| 273 | libtest_with_dependency_loop_c_shared_libraries := \ |
| 274 | libtest_with_dependency_loop_a |
| 275 | |
| 276 | module := libtest_with_dependency_loop_c |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 277 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 278 | |
| 279 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 280 | # libtest_relo_check_dt_needed_order.so |
| 281 | # | |
| 282 | # +-> libtest_relo_check_dt_needed_order_1.so |
| 283 | # | |
| 284 | # +-> libtest_relo_check_dt_needed_order_2.so |
| 285 | # ----------------------------------------------------------------------------- |
| 286 | libtest_relo_check_dt_needed_order_shared_libraries := \ |
| 287 | libtest_relo_check_dt_needed_order_1 libtest_relo_check_dt_needed_order_2 |
| 288 | |
| 289 | libtest_relo_check_dt_needed_order_src_files := dlopen_testlib_relo_check_dt_needed_order.cpp |
| 290 | libtest_relo_check_dt_needed_order_1_src_files := dlopen_testlib_relo_check_dt_needed_order_1.cpp |
| 291 | libtest_relo_check_dt_needed_order_2_src_files := dlopen_testlib_relo_check_dt_needed_order_2.cpp |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 292 | |
| 293 | module := libtest_relo_check_dt_needed_order |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 294 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 295 | module := libtest_relo_check_dt_needed_order_1 |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 296 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 297 | module := libtest_relo_check_dt_needed_order_2 |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 298 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | b2a30ee | 2014-09-04 18:23:00 -0700 | [diff] [blame] | 299 | |
| 300 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 301 | # Library with dependency used by dlfcn tests |
| 302 | # ----------------------------------------------------------------------------- |
| 303 | libtest_with_dependency_src_files := \ |
| 304 | dlopen_testlib_simple.cpp |
| 305 | |
| 306 | libtest_with_dependency_shared_libraries := libdlext_test |
| 307 | |
| 308 | module := libtest_with_dependency |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 309 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 310 | |
| 311 | # ----------------------------------------------------------------------------- |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame] | 312 | # Library used by ifunc tests |
| 313 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 314 | libtest_ifunc_src_files := \ |
| 315 | dlopen_testlib_ifunc.c |
| 316 | |
| 317 | libtest_ifunc_clang_host := false |
| 318 | module := libtest_ifunc |
| 319 | build_target := SHARED_LIBRARY |
| 320 | |
| 321 | build_type := host |
| 322 | include $(TEST_PATH)/Android.build.mk |
| 323 | |
Dmitriy Ivanov | 9aea164 | 2014-09-11 15:16:03 -0700 | [diff] [blame] | 324 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm64 x86 x86_64)) |
Dmitriy Ivanov | 9aea164 | 2014-09-11 15:16:03 -0700 | [diff] [blame] | 325 | ifeq ($(TARGET_ARCH),arm64) |
| 326 | libtest_ifunc_multilib := 64 |
| 327 | # TODO: This is a workaround - remove it once gcc |
| 328 | # removes its Android ifunc checks |
| 329 | libtest_ifunc_cflags := -mglibc |
| 330 | endif |
| 331 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 332 | build_type := target |
Chih-Hung Hsieh | b086298 | 2014-10-24 11:04:51 -0700 | [diff] [blame] | 333 | libtest_ifunc_clang_target := false |
Brigid Smith | c5a13ef | 2014-07-23 11:22:25 -0700 | [diff] [blame] | 334 | include $(TEST_PATH)/Android.build.mk |
| 335 | endif |
| 336 | |
| 337 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 338 | # Library used by atexit tests |
| 339 | # ----------------------------------------------------------------------------- |
| 340 | |
| 341 | libtest_atexit_src_files := \ |
| 342 | atexit_testlib.cpp |
| 343 | |
| 344 | module := libtest_atexit |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 345 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 346 | |
Dmitriy Ivanov | ce44166 | 2014-06-17 15:56:38 -0700 | [diff] [blame] | 347 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 348 | # This library is used by dl_load test to check symbol preempting |
| 349 | # by main executable |
| 350 | # ----------------------------------------------------------------------------- |
| 351 | libdl_preempt_test_1_src_files := dl_preempt_library_1.cpp |
| 352 | |
| 353 | module := libdl_preempt_test_1 |
| 354 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 355 | |
| 356 | # ----------------------------------------------------------------------------- |
| 357 | # This library is used by dl_load test to check symbol preempting |
| 358 | # by libdl_preempt_test_1.so |
| 359 | # ----------------------------------------------------------------------------- |
| 360 | libdl_preempt_test_2_src_files := dl_preempt_library_2.cpp |
| 361 | |
| 362 | module := libdl_preempt_test_2 |
| 363 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 364 | |
| 365 | # ----------------------------------------------------------------------------- |
| 366 | # Library with DF_1_GLOBAL |
| 367 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 368 | libdl_test_df_1_global_src_files := dl_df_1_global.cpp |
Dmitriy Ivanov | 6612d7a | 2015-04-24 16:26:03 -0700 | [diff] [blame] | 369 | libdl_test_df_1_global_ldflags := -Wl,-z,global |
Dmitriy Ivanov | 9333324 | 2015-05-14 21:28:21 -0700 | [diff] [blame] | 370 | |
Dmitriy Ivanov | 6612d7a | 2015-04-24 16:26:03 -0700 | [diff] [blame] | 371 | # TODO (dimitry): host ld.gold does not yet support -z global |
| 372 | # remove this line once it is updated. |
| 373 | libdl_test_df_1_global_ldflags_host := -fuse-ld=bfd |
| 374 | |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 375 | module := libdl_test_df_1_global |
| 376 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | d225a5e | 2014-08-28 14:12:12 -0700 | [diff] [blame] | 377 | |
| 378 | # ----------------------------------------------------------------------------- |
| 379 | # Library using symbol from libdl_test_df_1_global |
| 380 | # ----------------------------------------------------------------------------- |
| 381 | libtest_dlsym_df_1_global_src_files := dl_df_1_use_global.cpp |
| 382 | module := libtest_dlsym_df_1_global |
| 383 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 384 | |
| 385 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ce44166 | 2014-06-17 15:56:38 -0700 | [diff] [blame] | 386 | # Library with weak function |
| 387 | # ----------------------------------------------------------------------------- |
| 388 | libtest_dlsym_weak_func_src_files := \ |
| 389 | dlsym_weak_function.cpp |
| 390 | |
| 391 | module := libtest_dlsym_weak_func |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 392 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | bfa88bc | 2014-12-16 11:40:46 -0800 | [diff] [blame] | 393 | |
| 394 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 395 | # Library to check RTLD_LOCAL with dlsym in 'this' |
| 396 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 697bd9f | 2015-05-12 11:12:27 -0700 | [diff] [blame] | 397 | libtest_dlsym_from_this_src_files := dlsym_from_this_symbol.cpp |
| 398 | |
| 399 | libtest_dlsym_from_this_shared_libraries_target := libdl |
| 400 | libtest_dlsym_from_this_shared_libraries := libtest_dlsym_from_this_child |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 401 | |
| 402 | module := libtest_dlsym_from_this |
Dmitriy Ivanov | 697bd9f | 2015-05-12 11:12:27 -0700 | [diff] [blame] | 403 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 404 | |
Dmitriy Ivanov | 697bd9f | 2015-05-12 11:12:27 -0700 | [diff] [blame] | 405 | # ----------------------------------------------------------------------------- |
| 406 | libtest_dlsym_from_this_child_src_files := dlsym_from_this_functions.cpp |
| 407 | |
| 408 | libtest_dlsym_from_this_child_shared_libraries := libtest_dlsym_from_this_grandchild |
| 409 | |
| 410 | module := libtest_dlsym_from_this_child |
| 411 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 412 | |
| 413 | # ----------------------------------------------------------------------------- |
| 414 | libtest_dlsym_from_this_grandchild_src_files := dlsym_from_this_symbol2.cpp |
| 415 | |
| 416 | module := libtest_dlsym_from_this_grandchild |
Dmitriy Ivanov | 76ac1ac | 2015-04-01 14:45:10 -0700 | [diff] [blame] | 417 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 418 | |
| 419 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | f439b5a | 2015-05-30 13:04:39 -0700 | [diff] [blame] | 420 | # Empty library |
| 421 | # ----------------------------------------------------------------------------- |
| 422 | libtest_empty_src_files := empty.cpp |
| 423 | |
| 424 | module := libtest_empty |
| 425 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 426 | |
| 427 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | bfa88bc | 2014-12-16 11:40:46 -0800 | [diff] [blame] | 428 | # Library with weak undefined function |
| 429 | # ----------------------------------------------------------------------------- |
| 430 | libtest_dlopen_weak_undefined_func_src_files := \ |
| 431 | dlopen_weak_undefined.cpp |
| 432 | |
| 433 | module := libtest_dlopen_weak_undefined_func |
| 434 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 435 | |
| 436 | # ----------------------------------------------------------------------------- |
| 437 | # Library with constructor that calls dlopen() b/7941716 |
| 438 | # ----------------------------------------------------------------------------- |
| 439 | libtest_dlopen_from_ctor_src_files := \ |
| 440 | dlopen_testlib_dlopen_from_ctor.cpp |
| 441 | |
| 442 | module := libtest_dlopen_from_ctor |
| 443 | |
Dmitriy Ivanov | 45c5713 | 2015-04-03 15:17:52 -0700 | [diff] [blame] | 444 | libtest_dlopen_from_ctor_shared_libraries_target := libdl |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 445 | |
Dmitriy Ivanov | 45c5713 | 2015-04-03 15:17:52 -0700 | [diff] [blame] | 446 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 279a22f | 2015-01-23 12:03:53 -0800 | [diff] [blame] | 447 | |
| 448 | # ----------------------------------------------------------------------------- |
| 449 | # Library that depends on the library with constructor that calls dlopen() b/7941716 |
| 450 | # ----------------------------------------------------------------------------- |
| 451 | |
| 452 | libtest_dlopen_from_ctor_main_src_files := empty.cpp |
| 453 | libtest_dlopen_from_ctor_main_shared_libraries := libtest_dlopen_from_ctor |
| 454 | |
| 455 | module := libtest_dlopen_from_ctor_main |
| 456 | include $(LOCAL_PATH)/Android.build.testlib.mk |