platform_bionic/libc/arch-arm/bionic
Ryan Prichard 22a6a058c7 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
2019-10-14 16:34:12 -07:00
..
__aeabi.c Remove workarounds for old versions of clang and GCC. 2018-07-11 13:18:29 -07:00
__aeabi_read_tp.S Add ARM EABI function __aeabi_read_tp 2019-01-07 20:30:35 -08:00
__bionic_clone.S Use ENTRY_PRIVATE in __bionic_clone assembler. 2016-10-26 17:01:58 -07:00
__restore.S Add a no dwarf version of assembler macros. 2015-09-30 15:32:15 -07:00
_exit_with_stack_teardown.S Hide _exit_with_stack_teardown. 2014-05-16 16:17:44 -07:00
atexit_legacy.c Move libc_log code into libasync_safe. 2017-05-03 08:50:43 -07:00
atomics_arm.c libc: Fix typo that broke NDK compatibility. 2011-11-23 14:38:36 +01:00
bpabi.c Implement __gnu_[u]ldivmod_helper methods in libc 2019-04-22 18:12:55 -07:00
exidx_dynamic.c Move __aeabi* symbols to LIBC_N version 2016-01-08 10:13:16 -08:00
exidx_static.c Move dl_unwind_find_exidx from libdl.a to libc.a 2019-10-14 16:34:12 -07:00
kuser_helper_on.S Give ELF notes 4-byte alignment. 2017-12-04 13:21:01 -08:00
libcrt_compat.c Switch libm to libcrt.builtins 2019-02-22 13:33:15 -08:00
popcount_tab.c Add exported __popcount_tab for libgcc compat under compiler-rt. 2015-08-24 13:06:10 -07:00
setjmp.S Improve the comment in the ARM setjmp.S. 2018-02-05 13:36:02 -08:00
syscall.S Ensure __set_errno is still visible on LP32. 2014-09-08 16:46:50 -07:00
vfork.S Make tls related header files platform accessible. 2019-09-27 12:14:24 -07:00