blob: 0528cd8898abd486729dbdaff69578a4014cf3e3 [file] [log] [blame]
dimitry581723e2018-01-05 14:31:44 +01001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in
12 * the documentation and/or other materials provided with the
13 * distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
dimitry581723e2018-01-05 14:31:44 +010029#include <sys/cdefs.h>
30
dimitry581723e2018-01-05 14:31:44 +010031extern "C" void __internal_linker_error() {
Ryan Prichard470b6662018-03-27 22:10:55 -070032 __builtin_trap();
dimitry581723e2018-01-05 14:31:44 +010033}
34
35__strong_alias(__loader_android_create_namespace, __internal_linker_error);
36__strong_alias(__loader_android_dlopen_ext, __internal_linker_error);
37__strong_alias(__loader_android_dlwarning, __internal_linker_error);
38__strong_alias(__loader_android_get_application_target_sdk_version, __internal_linker_error);
39__strong_alias(__loader_android_get_LD_LIBRARY_PATH, __internal_linker_error);
40__strong_alias(__loader_android_get_exported_namespace, __internal_linker_error);
41__strong_alias(__loader_android_init_anonymous_namespace, __internal_linker_error);
42__strong_alias(__loader_android_link_namespaces, __internal_linker_error);
Logan Chien9ee45912018-01-18 12:05:09 +080043__strong_alias(__loader_android_link_namespaces_all_libs, __internal_linker_error);
dimitry581723e2018-01-05 14:31:44 +010044__strong_alias(__loader_android_set_application_target_sdk_version, __internal_linker_error);
45__strong_alias(__loader_android_update_LD_LIBRARY_PATH, __internal_linker_error);
46__strong_alias(__loader_cfi_fail, __internal_linker_error);
47__strong_alias(__loader_dl_iterate_phdr, __internal_linker_error);
48__strong_alias(__loader_dladdr, __internal_linker_error);
49__strong_alias(__loader_dlclose, __internal_linker_error);
50__strong_alias(__loader_dlerror, __internal_linker_error);
51__strong_alias(__loader_dlopen, __internal_linker_error);
52__strong_alias(__loader_dlsym, __internal_linker_error);
53__strong_alias(__loader_dlvsym, __internal_linker_error);
dimitry06016f22018-01-05 11:39:28 +010054__strong_alias(__loader_add_thread_local_dtor, __internal_linker_error);
55__strong_alias(__loader_remove_thread_local_dtor, __internal_linker_error);
dimitry581723e2018-01-05 14:31:44 +010056#if defined(__arm__)
57__strong_alias(__loader_dl_unwind_find_exidx, __internal_linker_error);
58#endif
59__strong_alias(rtld_db_dlactivity, __internal_linker_error);
60
Ryan Prichard470b6662018-03-27 22:10:55 -070061#if defined(__arm__)
62// An arm32 unwinding table has an R_ARM_NONE relocation to
63// __aeabi_unwind_cpp_pr0. This shared library will never invoke the unwinder,
64// so it doesn't actually need the routine. Define a dummy version here,
65// because the real version calls libc functions (e.g. memcpy, abort), which
66// would create a dependency cycle with libc.so.
67__attribute__((visibility("hidden")))
68extern "C" void __aeabi_unwind_cpp_pr0() {
69 __builtin_trap();
70}
71#endif