summaryrefslogtreecommitdiff
path: root/libdl
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2019-10-10 23:59:30 -0700
committerRyan Prichard <rprichard@google.com>2019-10-14 16:34:12 -0700
commit22a6a058c7c785eff58d6c366bb85082da154080 (patch)
treef857233fd0ce0946eef2bf5d5e96b102a71ac961 /libdl
parent95712059371aa522c80f1cab3cc3eb5431cc7f71 (diff)
Move dl_unwind_find_exidx from libdl.a to libc.a
arm32 has two special APIs to find exidx exception handling info, dl_unwind_find_exidx and __gnu_Unwind_Find_exdix. The two functions have identical behavior and function prototypes. libgcc's arm32 unwinder calls __gnu_Unwind_Find_exdix, whereas LLVM's libunwind previously called __gnu_Unwind_Find_exdix, but switched to dl_unwind_find_exidx as a result of three patches (D30306, D30681, D39468). In Bionic, for dynamic linking, __gnu_Unwind_Find_exdix in libc.so calls dl_unwind_find_exidx in libdl.so. For static executables, though, __gnu_Unwind_Find_exdix in libc.a used the __exidx_* symbols, while dl_unwind_find_exidx in libdl.a(libdl_static.o) was a return-0 no-op. To fix the LLVM unwinder, replace the no-op dl_unwind_find_exidx in libdl.a with a real function in libc.a(exidx_static.o), and have the GNU function call the dl function for more consistency with dynamic linking. dl_iterate_phdr follows a similar pattern, where the function exists in libc.a and libdl.so (not libc.so or libdl.a). This change makes unwinding work with an updated libunwind_llvm on arm32, and it helps to allow unwinding in static executables without libdl.a. Bug: https://github.com/android/ndk/issues/1094 Bug: http://b/141485154 Test: NDK tests, bionic unit tests Change-Id: Ieeeb9b39a0e28544e21f9afe6fe51ef10d7c828c
Diffstat (limited to 'libdl')
-rw-r--r--libdl/libdl_static.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/libdl/libdl_static.cpp b/libdl/libdl_static.cpp
index 0a36e6f16..3bbf96329 100644
--- a/libdl/libdl_static.cpp
+++ b/libdl/libdl_static.cpp
@@ -41,9 +41,3 @@ int dladdr(const void* /*addr*/, Dl_info* /*info*/) {
int dlclose(void* /*handle*/) {
return -1;
}
-
-#if defined(__arm__)
-_Unwind_Ptr dl_unwind_find_exidx(_Unwind_Ptr /*pc*/, int* /*pcount*/) {
- return 0;
-}
-#endif