blob: ba0b1aaf77aa7a847d686ea0daa4980446fef89c [file] [log] [blame]
Colin Cross2722ebb2016-07-11 16:20:06 -07001//
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
17cc_defaults {
18 name: "bionic_testlib_defaults",
19 host_supported: true,
Chih-Hung Hsieh84f0dcd2017-10-02 11:47:31 -070020 cflags: [
21 "-Wall",
22 "-Werror",
23 ],
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070024 ldflags: [
Dimitry Ivanovd11d1e42016-10-05 02:51:17 -070025 "-Wl,--rpath,${ORIGIN}",
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070026 "-Wl,--enable-new-dtags",
27 ],
28 relative_install_path: "bionic-loader-test-libs",
29 gtest: false,
Colin Cross2722ebb2016-07-11 16:20:06 -070030 sanitize: {
Evgenii Stepanov0a3637d2016-07-06 13:20:59 -070031 address: false,
32 coverage: false,
Colin Cross2722ebb2016-07-11 16:20:06 -070033 },
Yabin Cui1f553ea2017-01-13 12:31:59 -080034 stl: "libc++_static",
Colin Cross2722ebb2016-07-11 16:20:06 -070035 target: {
36 darwin: {
37 enabled: false,
38 },
39 },
40}
41
42// -----------------------------------------------------------------------------
43// Library to test gnu-styled hash
44// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070045cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -070046 name: "libgnu-hash-table-library",
47 defaults: ["bionic_testlib_defaults"],
48 srcs: ["dlext_test_library.cpp"],
49 ldflags: ["-Wl,--hash-style=gnu"],
50 arch: {
51 mips: {
52 enabled: false,
53 },
54 mips64: {
55 enabled: false,
56 },
57 },
58}
59
60// -----------------------------------------------------------------------------
61// Library to test sysv-styled hash
62// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070063cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -070064 name: "libsysv-hash-table-library",
65 defaults: ["bionic_testlib_defaults"],
66 srcs: ["dlext_test_library.cpp"],
67 ldflags: ["-Wl,--hash-style=sysv"],
68}
69
70// -----------------------------------------------------------------------------
71// Library used by dlext tests - with GNU RELRO program header
72// -----------------------------------------------------------------------------
73// In Android.mk to support creating symlinks
74
75// -----------------------------------------------------------------------------
76// Library used by dlext tests - without GNU RELRO program header
77// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070078cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -070079 name: "libdlext_test_norelro",
Dimitry Ivanova36e59b2016-09-01 11:37:39 -070080 defaults: ["bionic_testlib_defaults"],
Colin Cross2722ebb2016-07-11 16:20:06 -070081 srcs: ["dlext_test_library.cpp"],
82 ldflags: ["-Wl,-z,norelro"],
83 shared_libs = ["libtest_simple"],
84}
85
86// -----------------------------------------------------------------------------
87// Library used by dlext tests - different name non-default location
88// -----------------------------------------------------------------------------
89// In Android.mk to support installing to /data
90
91// -----------------------------------------------------------------------------
92// Libraries used by dlext tests for open from a zip-file
93// -----------------------------------------------------------------------------
94// In Android.mk to support installing to /data
95
96// ----------------------------------------------------------------------------
97// Library with soname which does not match filename
98// ----------------------------------------------------------------------------
99// In Android.mk to support zipped and aligned tests
100
101// -----------------------------------------------------------------------------
102// Library used by dlext tests - zipped and aligned
103// -----------------------------------------------------------------------------
104// In Android.mk to support zipped and aligned tests
105
106// -----------------------------------------------------------------------------
107// Library used by dlfcn tests
108// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700109cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700110 name: "libtest_simple",
111 defaults: ["bionic_testlib_defaults"],
112 srcs: ["dlopen_testlib_simple.cpp"],
113}
114
115// -----------------------------------------------------------------------------
116// Library used by dlfcn nodelete tests
117// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700118cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700119 name: "libtest_nodelete_1",
120 defaults: ["bionic_testlib_defaults"],
121 srcs: ["dlopen_nodelete_1.cpp"],
122}
123
124// -----------------------------------------------------------------------------
125// Library used by dlfcn nodelete tests
126// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700127cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700128 name: "libtest_nodelete_2",
129 defaults: ["bionic_testlib_defaults"],
130 srcs: ["dlopen_nodelete_2.cpp"],
131}
132
133// -----------------------------------------------------------------------------
134// Library used by dlfcn nodelete tests
135// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700136cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700137 name: "libtest_nodelete_dt_flags_1",
138 defaults: ["bionic_testlib_defaults"],
139 srcs: ["dlopen_nodelete_dt_flags_1.cpp"],
140 ldflags: ["-Wl,-z,nodelete"],
141}
142
143// -----------------------------------------------------------------------------
144// Build test helper libraries for linker namespaces
145// -----------------------------------------------------------------------------
146// include $(LOCAL_PATH)/Android.build.linker_namespaces.mk
147
148// -----------------------------------------------------------------------------
149// Build DT_RUNPATH test helper libraries
150// -----------------------------------------------------------------------------
151// include $(LOCAL_PATH)/Android.build.dt_runpath.mk
152
153// -----------------------------------------------------------------------------
154// Build library with two parents
155// -----------------------------------------------------------------------------
156// include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk
157
158// -----------------------------------------------------------------------------
159// Build libtest_check_order_dlsym.so with its dependencies.
160// -----------------------------------------------------------------------------
161// include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk
162
163// -----------------------------------------------------------------------------
164// Build libtest_check_order_siblings.so with its dependencies.
165// -----------------------------------------------------------------------------
166// include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk
167
168// -----------------------------------------------------------------------------
169// Build libtest_check_order_root.so with its dependencies.
170// -----------------------------------------------------------------------------
171// include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk
172
173// -----------------------------------------------------------------------------
174// Build libtest_versioned_lib.so with its dependencies.
175// -----------------------------------------------------------------------------
176// include $(LOCAL_PATH)/Android.build.versioned_lib.mk
177
178// -----------------------------------------------------------------------------
179// Build libraries needed by pthread_atfork tests
180// -----------------------------------------------------------------------------
181// include $(LOCAL_PATH)/Android.build.pthread_atfork.mk
182
183// -----------------------------------------------------------------------------
184// Library with dependency loop used by dlfcn tests
185//
186// libtest_with_dependency_loop -> a -> b -> c -> a
187// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700188cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700189 name: "libtest_with_dependency_loop",
190 defaults: ["bionic_testlib_defaults"],
191 srcs: ["dlopen_testlib_loopy_root.cpp"],
192 shared_libs: ["libtest_with_dependency_loop_a"],
193}
194
195// -----------------------------------------------------------------------------
196// libtest_with_dependency_loop_a.so
197// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700198cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700199 name: "libtest_with_dependency_loop_a",
200 defaults: ["bionic_testlib_defaults"],
201 srcs: ["dlopen_testlib_loopy_a.cpp"],
202 shared_libs: ["libtest_with_dependency_loop_b_tmp"],
203}
204
205// -----------------------------------------------------------------------------
206// libtest_with_dependency_loop_b.so
207//
208// this is temporary placeholder - will be removed
209// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700210cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700211 name: "libtest_with_dependency_loop_b_tmp",
212 defaults: ["bionic_testlib_defaults"],
213 srcs: ["dlopen_testlib_loopy_invalid.cpp"],
214 ldflags: ["-Wl,-soname=libtest_with_dependency_loop_b.so"],
215}
216
217// -----------------------------------------------------------------------------
218// libtest_with_dependency_loop_b.so
219// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700220cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700221 name: "libtest_with_dependency_loop_b",
222 defaults: ["bionic_testlib_defaults"],
223 srcs: ["dlopen_testlib_loopy_b.cpp"],
224 shared_libs: ["libtest_with_dependency_loop_c"],
225}
226
227// -----------------------------------------------------------------------------
228// libtest_with_dependency_loop_c.so
229// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700230cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700231 name: "libtest_with_dependency_loop_c",
232 defaults: ["bionic_testlib_defaults"],
233 srcs: ["dlopen_testlib_loopy_c.cpp"],
234 shared_libs: ["libtest_with_dependency_loop_a"],
235}
236
237// -----------------------------------------------------------------------------
238// libtest_relo_check_dt_needed_order.so
239// |
240// +-> libtest_relo_check_dt_needed_order_1.so
241// |
242// +-> libtest_relo_check_dt_needed_order_2.so
243// -----------------------------------------------------------------------------
244
245
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700246cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700247 name: "libtest_relo_check_dt_needed_order",
248 defaults: ["bionic_testlib_defaults"],
249 srcs: ["dlopen_testlib_relo_check_dt_needed_order.cpp"],
250 shared_libs: [
251 "libtest_relo_check_dt_needed_order_1",
252 "libtest_relo_check_dt_needed_order_2",
253 ],
254}
255
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700256cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700257 name: "libtest_relo_check_dt_needed_order_1",
258 defaults: ["bionic_testlib_defaults"],
259 srcs: ["dlopen_testlib_relo_check_dt_needed_order_1.cpp"],
260}
261
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700262cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700263 name: "libtest_relo_check_dt_needed_order_2",
264 defaults: ["bionic_testlib_defaults"],
265 srcs: ["dlopen_testlib_relo_check_dt_needed_order_2.cpp"],
266}
267
268// -----------------------------------------------------------------------------
269// Library with dependency used by dlfcn tests
270// -----------------------------------------------------------------------------
271// In Android.mk to support dependency on libdlext_test
272
273// -----------------------------------------------------------------------------
274// Library used by ifunc tests
275// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700276cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700277 name: "libtest_ifunc",
278 defaults: ["bionic_testlib_defaults"],
Dimitry Ivanov21975b22017-05-02 16:31:56 -0700279 srcs: ["dlopen_testlib_ifunc.cpp"],
Colin Cross2722ebb2016-07-11 16:20:06 -0700280
Colin Cross2722ebb2016-07-11 16:20:06 -0700281 arch: {
282 mips: {
283 enabled: false,
284 },
285 mips64: {
286 enabled: false,
287 },
288 },
Dimitry Ivanov21975b22017-05-02 16:31:56 -0700289}
290
291cc_test_library {
292 name: "libtest_ifunc_variable",
293 defaults: ["bionic_testlib_defaults"],
294 srcs: ["dlopen_testlib_ifunc_variable.cpp"],
295 shared_libs: [ "libtest_ifunc_variable_impl" ],
296
297 arch: {
298 mips: {
299 enabled: false,
300 },
301 mips64: {
302 enabled: false,
303 },
304 },
Dimitry Ivanov21975b22017-05-02 16:31:56 -0700305}
306
307cc_test_library {
308 name: "libtest_ifunc_variable_impl",
309 defaults: ["bionic_testlib_defaults"],
310 srcs: ["dlopen_testlib_ifunc_variable_impl.cpp"],
311
312 arch: {
313 mips: {
314 enabled: false,
315 },
316 mips64: {
317 enabled: false,
318 },
319 },
Colin Cross2722ebb2016-07-11 16:20:06 -0700320}
321
322// -----------------------------------------------------------------------------
323// Library used by atexit tests
324// -----------------------------------------------------------------------------
325
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700326cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700327 name: "libtest_atexit",
328 defaults: ["bionic_testlib_defaults"],
329 srcs: ["atexit_testlib.cpp"],
330}
331
332// -----------------------------------------------------------------------------
333// This library is used by dl_load test to check symbol preempting
334// by main executable
335// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700336cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700337 name: "libdl_preempt_test_1",
338 defaults: ["bionic_testlib_defaults"],
339 srcs: ["dl_preempt_library_1.cpp"],
340}
341
342// -----------------------------------------------------------------------------
343// This library is used by dl_load test to check symbol preempting
344// by libdl_preempt_test_1.so
345// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700346cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700347 name: "libdl_preempt_test_2",
348 defaults: ["bionic_testlib_defaults"],
349 srcs: ["dl_preempt_library_2.cpp"],
350}
351
352// -----------------------------------------------------------------------------
353// Library with DF_1_GLOBAL
354// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700355cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700356 name: "libdl_test_df_1_global",
357 defaults: ["bionic_testlib_defaults"],
358 srcs: ["dl_df_1_global.cpp"],
359 ldflags: ["-Wl,-z,global"],
360
361 target: {
362 host: {
363 // TODO (dimitry): host ld.gold does not yet support -z global
364 // remove this line once it is updated.
365 ldflags: ["-fuse-ld=bfd"],
366 },
367 },
368}
369
370// -----------------------------------------------------------------------------
371// Library using symbol from libdl_test_df_1_global
372// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700373cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700374 name: "libtest_dlsym_df_1_global",
375 defaults: ["bionic_testlib_defaults"],
376 srcs: ["dl_df_1_use_global.cpp"],
377}
378
379// -----------------------------------------------------------------------------
Jiyong Park01162f22017-10-16 15:31:09 +0900380// Library with DF_1_GLOBAL which will be dlopened
381// (note: libdl_test_df_1_global above will be included in DT_NEEDED)
382// -----------------------------------------------------------------------------
383cc_test_library {
384 name: "libtest_dlopen_df_1_global",
385 defaults: ["bionic_testlib_defaults"],
386 srcs: ["dl_df_1_global_dummy.cpp"],
387 ldflags: ["-Wl,-z,global"],
388
389 target: {
390 host: {
391 // TODO (dimitry): host ld.gold does not yet support -z global
392 // remove this line once it is updated.
393 ldflags: ["-fuse-ld=bfd"],
394 },
395 },
396}
397
398
399// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700400// Library with weak function
401// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700402cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700403 name: "libtest_dlsym_weak_func",
404 defaults: ["bionic_testlib_defaults"],
405 srcs: ["dlsym_weak_function.cpp"],
406}
407
408// -----------------------------------------------------------------------------
409// Library to check RTLD_LOCAL with dlsym in 'this'
410// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700411cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700412 name: "libtest_dlsym_from_this",
413 defaults: ["bionic_testlib_defaults"],
414 srcs: ["dlsym_from_this_symbol.cpp"],
415 shared_libs: ["libtest_dlsym_from_this_child"],
Colin Cross2722ebb2016-07-11 16:20:06 -0700416}
417
418// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700419cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700420 name: "libtest_dlsym_from_this_child",
421 defaults: ["bionic_testlib_defaults"],
422 srcs: ["dlsym_from_this_functions.cpp"],
423 shared_libs: ["libtest_dlsym_from_this_grandchild"],
424}
425
426// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700427cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700428 name: "libtest_dlsym_from_this_grandchild",
429 defaults: ["bionic_testlib_defaults"],
430 srcs: ["dlsym_from_this_symbol2.cpp"],
431}
432
433// -----------------------------------------------------------------------------
434// Empty library
435// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700436cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700437 name: "libtest_empty",
438 defaults: ["bionic_testlib_defaults"],
439 srcs: ["empty.cpp"],
440}
441
442// -----------------------------------------------------------------------------
443// Library with weak undefined function
444// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700445cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700446 name: "libtest_dlopen_weak_undefined_func",
447 defaults: ["bionic_testlib_defaults"],
448 srcs: ["dlopen_weak_undefined.cpp"],
449}
450
451// -----------------------------------------------------------------------------
Dimitry Ivanovd0b5c3a2016-11-25 12:23:11 -0800452// Check that RTLD_NEXT of a libc symbol works in dlopened library
453// -----------------------------------------------------------------------------
454cc_test_library {
455 name: "libtest_check_rtld_next_from_library",
456 defaults: ["bionic_testlib_defaults"],
457 srcs: ["check_rtld_next_from_library.cpp"],
Dimitry Ivanovd0b5c3a2016-11-25 12:23:11 -0800458}
459
460// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700461// Library with constructor that calls dlopen() b/7941716
462// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700463cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700464 name: "libtest_dlopen_from_ctor",
465 defaults: ["bionic_testlib_defaults"],
466 srcs: ["dlopen_testlib_dlopen_from_ctor.cpp"],
Colin Cross2722ebb2016-07-11 16:20:06 -0700467}
468
469// -----------------------------------------------------------------------------
Dimitry Ivanovec90e242017-02-10 11:04:20 -0800470// Libraries used to check init/fini call order
Dimitry Ivanovea8f3962017-02-09 13:31:57 -0800471// -----------------------------------------------------------------------------
472cc_test_library {
473 name: "libtest_init_fini_order_root",
474 defaults: ["bionic_testlib_defaults"],
475 srcs: ["dlopen_check_init_fini_root.cpp"],
Dimitry Ivanovec90e242017-02-10 11:04:20 -0800476 shared_libs: [
477 "libtest_init_fini_order_child",
478 "libtest_init_fini_order_grand_child",
479 ],
480}
481
482cc_test_library {
483 name: "libtest_init_fini_order_root2",
484 defaults: ["bionic_testlib_defaults"],
485 srcs: ["dlopen_check_init_fini_root.cpp"],
486 shared_libs: [
487 "libtest_init_fini_order_grand_child",
488 "libtest_init_fini_order_child",
489 ],
Dimitry Ivanovea8f3962017-02-09 13:31:57 -0800490}
491
492cc_test_library {
493 name: "libtest_init_fini_order_child",
494 defaults: ["bionic_testlib_defaults"],
495 srcs: ["dlopen_check_init_fini_child.cpp"],
496 shared_libs: ["libtest_init_fini_order_grand_child"],
497}
498
499cc_test_library {
500 name: "libtest_init_fini_order_grand_child",
501 defaults: ["bionic_testlib_defaults"],
502 srcs: ["dlopen_check_init_fini_grand_child.cpp"],
503}
504
505// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700506// Library that depends on the library with constructor that calls dlopen() b/7941716
507// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700508cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700509 name: "libtest_dlopen_from_ctor_main",
510 defaults: ["bionic_testlib_defaults"],
511 srcs: ["empty.cpp"],
512 shared_libs: ["libtest_dlopen_from_ctor"],
513}
514
515// -----------------------------------------------------------------------------
516// Tool to use to align the shared libraries in a zip file.
517// -----------------------------------------------------------------------------
518cc_binary_host {
519 name: "bionic_tests_zipalign",
520 srcs: ["bionic_tests_zipalign.cpp"],
521 cflags: [
522 "-Wall",
523 "-Werror",
524 ],
525
526 static_libs: [
527 "libziparchive",
528 "liblog",
529 "libbase",
530 "libz",
531 "libutils",
532 ],
Colin Cross2722ebb2016-07-11 16:20:06 -0700533}
Evgenii Stepanov0a3637d2016-07-06 13:20:59 -0700534
535cc_test_library {
536 name: "libcfi-test",
537 defaults: ["bionic_testlib_defaults"],
538 srcs: ["cfi_test_lib.cpp"],
539 sanitize: {
540 cfi: false,
541 },
542}
543
544cc_test_library {
545 name: "libcfi-test-bad",
546 defaults: ["bionic_testlib_defaults"],
547 srcs: ["cfi_test_bad_lib.cpp"],
548 sanitize: {
549 cfi: false,
550 },
551}
Evgenii Stepanov68ecec12017-01-31 13:19:30 -0800552
553cc_test {
554 name: "cfi_test_helper",
555 host_supported: false,
556 defaults: ["bionic_testlib_defaults"],
557 srcs: ["cfi_test_helper.cpp"],
558 ldflags: ["-rdynamic"],
559}
560
561cc_test {
562 name: "cfi_test_helper2",
563 host_supported: false,
564 defaults: ["bionic_testlib_defaults"],
565 srcs: ["cfi_test_helper2.cpp"],
566 shared_libs: ["libcfi-test"],
567 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
568}
Elliott Hugheseb04ed52017-03-29 13:48:02 -0700569
570cc_test {
571 name: "preinit_getauxval_test_helper",
572 host_supported: false,
573 defaults: ["bionic_testlib_defaults"],
574 srcs: ["preinit_getauxval_test_helper.cpp"],
575}
576
577cc_test {
578 name: "preinit_syscall_test_helper",
579 host_supported: false,
580 defaults: ["bionic_testlib_defaults"],
581 srcs: ["preinit_syscall_test_helper.cpp"],
582}
Jiyong Park02586a22017-05-20 01:01:24 +0900583
584cc_test {
585 name: "ld_preload_test_helper",
586 host_supported: false,
587 defaults: ["bionic_testlib_defaults"],
588 srcs: ["ld_preload_test_helper.cpp"],
589 shared_libs: ["ld_preload_test_helper_lib1"],
590 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
591}
592
593cc_test_library {
594 name: "ld_preload_test_helper_lib1",
595 host_supported: false,
596 defaults: ["bionic_testlib_defaults"],
597 srcs: ["ld_preload_test_helper_lib1.cpp"],
598}
599
600cc_test_library {
601 name: "ld_preload_test_helper_lib2",
602 host_supported: false,
603 defaults: ["bionic_testlib_defaults"],
604 srcs: ["ld_preload_test_helper_lib2.cpp"],
605}
606
607cc_test {
608 name: "ld_config_test_helper",
609 host_supported: false,
610 defaults: ["bionic_testlib_defaults"],
611 srcs: ["ld_config_test_helper.cpp"],
612 shared_libs: ["ld_config_test_helper_lib1"],
613 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
614}
615
616cc_test_library {
617 name: "ld_config_test_helper_lib1",
618 host_supported: false,
619 defaults: ["bionic_testlib_defaults"],
620 srcs: ["ld_config_test_helper_lib1.cpp"],
621 shared_libs: ["ld_config_test_helper_lib2"],
622 relative_install_path: "/ns2",
623}
624
625cc_test_library {
626 name: "ld_config_test_helper_lib2",
627 host_supported: false,
628 defaults: ["bionic_testlib_defaults"],
629 srcs: ["ld_config_test_helper_lib2.cpp"],
630 relative_install_path: "/ns2",
631}
632
633cc_test_library {
634 name: "ld_config_test_helper_lib3",
635 host_supported: false,
636 defaults: ["bionic_testlib_defaults"],
637 srcs: ["ld_config_test_helper_lib3.cpp"],
638}