blob: 5f27387947f2e87199a7e981ab71f38e92f7ecb5 [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// -----------------------------------------------------------------------------
dimitry8db36a52017-10-23 15:10:10 +0200443// Library for inaccessible shared library test
444// -----------------------------------------------------------------------------
445cc_test_library {
446 name: "libtestshared",
447 defaults: ["bionic_testlib_defaults"],
448 srcs: ["empty.cpp"],
449 relative_install_path: "/inaccessible_libs",
450}
451
452// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700453// Library with weak undefined function
454// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700455cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700456 name: "libtest_dlopen_weak_undefined_func",
457 defaults: ["bionic_testlib_defaults"],
458 srcs: ["dlopen_weak_undefined.cpp"],
459}
460
461// -----------------------------------------------------------------------------
Dimitry Ivanovd0b5c3a2016-11-25 12:23:11 -0800462// Check that RTLD_NEXT of a libc symbol works in dlopened library
463// -----------------------------------------------------------------------------
464cc_test_library {
465 name: "libtest_check_rtld_next_from_library",
466 defaults: ["bionic_testlib_defaults"],
467 srcs: ["check_rtld_next_from_library.cpp"],
Dimitry Ivanovd0b5c3a2016-11-25 12:23:11 -0800468}
469
470// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700471// Library with constructor that calls dlopen() b/7941716
472// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700473cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700474 name: "libtest_dlopen_from_ctor",
475 defaults: ["bionic_testlib_defaults"],
476 srcs: ["dlopen_testlib_dlopen_from_ctor.cpp"],
Colin Cross2722ebb2016-07-11 16:20:06 -0700477}
478
479// -----------------------------------------------------------------------------
Dimitry Ivanovec90e242017-02-10 11:04:20 -0800480// Libraries used to check init/fini call order
Dimitry Ivanovea8f3962017-02-09 13:31:57 -0800481// -----------------------------------------------------------------------------
482cc_test_library {
483 name: "libtest_init_fini_order_root",
484 defaults: ["bionic_testlib_defaults"],
485 srcs: ["dlopen_check_init_fini_root.cpp"],
Dimitry Ivanovec90e242017-02-10 11:04:20 -0800486 shared_libs: [
487 "libtest_init_fini_order_child",
488 "libtest_init_fini_order_grand_child",
489 ],
490}
491
492cc_test_library {
493 name: "libtest_init_fini_order_root2",
494 defaults: ["bionic_testlib_defaults"],
495 srcs: ["dlopen_check_init_fini_root.cpp"],
496 shared_libs: [
497 "libtest_init_fini_order_grand_child",
498 "libtest_init_fini_order_child",
499 ],
Dimitry Ivanovea8f3962017-02-09 13:31:57 -0800500}
501
502cc_test_library {
503 name: "libtest_init_fini_order_child",
504 defaults: ["bionic_testlib_defaults"],
505 srcs: ["dlopen_check_init_fini_child.cpp"],
506 shared_libs: ["libtest_init_fini_order_grand_child"],
507}
508
509cc_test_library {
510 name: "libtest_init_fini_order_grand_child",
511 defaults: ["bionic_testlib_defaults"],
512 srcs: ["dlopen_check_init_fini_grand_child.cpp"],
513}
514
515// -----------------------------------------------------------------------------
Colin Cross2722ebb2016-07-11 16:20:06 -0700516// Library that depends on the library with constructor that calls dlopen() b/7941716
517// -----------------------------------------------------------------------------
Dimitry Ivanova36e59b2016-09-01 11:37:39 -0700518cc_test_library {
Colin Cross2722ebb2016-07-11 16:20:06 -0700519 name: "libtest_dlopen_from_ctor_main",
520 defaults: ["bionic_testlib_defaults"],
521 srcs: ["empty.cpp"],
522 shared_libs: ["libtest_dlopen_from_ctor"],
523}
524
525// -----------------------------------------------------------------------------
526// Tool to use to align the shared libraries in a zip file.
527// -----------------------------------------------------------------------------
528cc_binary_host {
529 name: "bionic_tests_zipalign",
530 srcs: ["bionic_tests_zipalign.cpp"],
531 cflags: [
532 "-Wall",
533 "-Werror",
534 ],
535
536 static_libs: [
537 "libziparchive",
538 "liblog",
539 "libbase",
540 "libz",
541 "libutils",
542 ],
Colin Cross2722ebb2016-07-11 16:20:06 -0700543}
Evgenii Stepanov0a3637d2016-07-06 13:20:59 -0700544
545cc_test_library {
546 name: "libcfi-test",
547 defaults: ["bionic_testlib_defaults"],
548 srcs: ["cfi_test_lib.cpp"],
549 sanitize: {
550 cfi: false,
551 },
552}
553
554cc_test_library {
555 name: "libcfi-test-bad",
556 defaults: ["bionic_testlib_defaults"],
557 srcs: ["cfi_test_bad_lib.cpp"],
558 sanitize: {
559 cfi: false,
560 },
561}
Evgenii Stepanov68ecec12017-01-31 13:19:30 -0800562
563cc_test {
564 name: "cfi_test_helper",
565 host_supported: false,
566 defaults: ["bionic_testlib_defaults"],
567 srcs: ["cfi_test_helper.cpp"],
568 ldflags: ["-rdynamic"],
569}
570
571cc_test {
572 name: "cfi_test_helper2",
573 host_supported: false,
574 defaults: ["bionic_testlib_defaults"],
575 srcs: ["cfi_test_helper2.cpp"],
576 shared_libs: ["libcfi-test"],
577 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
578}
Elliott Hugheseb04ed52017-03-29 13:48:02 -0700579
580cc_test {
581 name: "preinit_getauxval_test_helper",
582 host_supported: false,
583 defaults: ["bionic_testlib_defaults"],
584 srcs: ["preinit_getauxval_test_helper.cpp"],
585}
586
587cc_test {
588 name: "preinit_syscall_test_helper",
589 host_supported: false,
590 defaults: ["bionic_testlib_defaults"],
591 srcs: ["preinit_syscall_test_helper.cpp"],
592}
Jiyong Park02586a22017-05-20 01:01:24 +0900593
594cc_test {
595 name: "ld_preload_test_helper",
596 host_supported: false,
597 defaults: ["bionic_testlib_defaults"],
598 srcs: ["ld_preload_test_helper.cpp"],
599 shared_libs: ["ld_preload_test_helper_lib1"],
600 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
601}
602
603cc_test_library {
604 name: "ld_preload_test_helper_lib1",
605 host_supported: false,
606 defaults: ["bionic_testlib_defaults"],
607 srcs: ["ld_preload_test_helper_lib1.cpp"],
608}
609
610cc_test_library {
611 name: "ld_preload_test_helper_lib2",
612 host_supported: false,
613 defaults: ["bionic_testlib_defaults"],
614 srcs: ["ld_preload_test_helper_lib2.cpp"],
615}
616
617cc_test {
618 name: "ld_config_test_helper",
619 host_supported: false,
620 defaults: ["bionic_testlib_defaults"],
621 srcs: ["ld_config_test_helper.cpp"],
622 shared_libs: ["ld_config_test_helper_lib1"],
623 ldflags: ["-Wl,--rpath,${ORIGIN}/.."],
624}
625
626cc_test_library {
627 name: "ld_config_test_helper_lib1",
628 host_supported: false,
629 defaults: ["bionic_testlib_defaults"],
630 srcs: ["ld_config_test_helper_lib1.cpp"],
631 shared_libs: ["ld_config_test_helper_lib2"],
632 relative_install_path: "/ns2",
633}
634
635cc_test_library {
636 name: "ld_config_test_helper_lib2",
637 host_supported: false,
638 defaults: ["bionic_testlib_defaults"],
639 srcs: ["ld_config_test_helper_lib2.cpp"],
640 relative_install_path: "/ns2",
641}
642
643cc_test_library {
644 name: "ld_config_test_helper_lib3",
645 host_supported: false,
646 defaults: ["bionic_testlib_defaults"],
647 srcs: ["ld_config_test_helper_lib3.cpp"],
648}