• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
29 #include <sys/cdefs.h>
30 
__internal_linker_error()31 extern "C" void __internal_linker_error() {
32   __builtin_trap();
33 }
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);
43 __strong_alias(__loader_android_link_namespaces_all_libs, __internal_linker_error);
44 __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);
54 __strong_alias(__loader_add_thread_local_dtor, __internal_linker_error);
55 __strong_alias(__loader_remove_thread_local_dtor, __internal_linker_error);
56 __strong_alias(__loader_shared_globals, __internal_linker_error);
57 #if defined(__arm__)
58 __strong_alias(__loader_dl_unwind_find_exidx, __internal_linker_error);
59 #endif
60 __strong_alias(rtld_db_dlactivity, __internal_linker_error);
61 
62 #if defined(__arm__)
63 // An arm32 unwinding table has an R_ARM_NONE relocation to
64 // __aeabi_unwind_cpp_pr0. This shared library will never invoke the unwinder,
65 // so it doesn't actually need the routine. Define a dummy version here,
66 // because the real version calls libc functions (e.g. memcpy, abort), which
67 // would create a dependency cycle with libc.so.
68 __attribute__((visibility("hidden")))
__aeabi_unwind_cpp_pr0()69 extern "C" void __aeabi_unwind_cpp_pr0() {
70   __builtin_trap();
71 }
72 #endif
73