platform_bionic/libc
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
..
arch-arm Move dl_unwind_find_exidx from libdl.a to libc.a 2019-10-14 16:34:12 -07:00
arch-arm64 Update to kernel headers v5.3.2. 2019-10-03 10:59:32 -07:00
arch-common/bionic crtbegin: replace TPREL with R_*_NONE relocs 2019-09-04 20:31:06 +00:00
arch-mips Generate assembler system call stubs via genrule. 2019-04-16 12:31:00 -07:00
arch-mips64/bionic Generate assembler system call stubs via genrule. 2019-04-16 12:31:00 -07:00
arch-x86 Make tls related header files platform accessible. 2019-09-27 12:14:24 -07:00
arch-x86_64 Make tls related header files platform accessible. 2019-09-27 12:14:24 -07:00
async_safe Enable native_bridge_support 2019-05-06 17:13:51 +02:00
bionic Merge "Reimplement the <ctype.h> is* functions." 2019-10-09 15:09:45 +00:00
dns Test for ns_parserr() and got a heap-buffer-overflow 2019-08-29 22:18:37 +08:00
include Merge "Reimplement the <ctype.h> is* functions." 2019-10-09 15:09:45 +00:00
kernel Update to kernel headers v5.3.2. 2019-10-03 10:59:32 -07:00
malloc_debug Restrict the availability of the bionic libs 2019-10-07 13:52:32 +09:00
malloc_hooks Make bionic_malloc.h a platform header. 2019-09-16 12:27:33 -07:00
platform/bionic Make tls related header files platform accessible. 2019-09-27 12:14:24 -07:00
private Make tls related header files platform accessible. 2019-09-27 12:14:24 -07:00
seccomp Remove global seccomp list. 2019-09-17 16:37:05 -07:00
stdio Remove the ___ hack. 2019-06-19 15:38:42 -07:00
stdlib Revert fwalk/sfp locking to fix concurrent reads 2019-05-04 00:28:00 -07:00
system_properties Enable native_bridge_support 2019-05-06 17:13:51 +02:00
tools Fix gensyscalls.py to actually use the input argument provided in 2019-09-26 15:02:04 -04:00
tzcode Remove bionic refs to runtime module tz files 2019-06-10 15:09:15 +01:00
upstream-freebsd Add reallocarray(3). 2018-09-26 14:24:18 -07:00
upstream-netbsd Sync with upstream NetBSD. 2019-02-13 14:17:18 -08:00
upstream-openbsd Reimplement the <ctype.h> is* functions. 2019-10-08 12:04:09 -07:00
versioner-dependencies Fix clang header dependency for versioner 2019-07-29 15:44:46 -07:00
Android.bp Move dl_unwind_find_exidx from libdl.a to libc.a 2019-10-14 16:34:12 -07:00
fs_config_generator.py
libc.map.txt libc: remove now-unused FORTIFY functions 2019-10-07 19:09:38 -07:00
libstdc++.map.txt
MODULE_LICENSE_BSD
NOTICE Update notice 2019-07-17 10:56:16 -07:00
SECCOMP_BLACKLIST_APP.TXT Blacklist setregid(32) for apps. 2019-01-22 17:22:54 +01:00
SECCOMP_BLACKLIST_COMMON.TXT Split zygote's seccomp filter into two 2018-01-04 12:28:40 -08:00
SECCOMP_WHITELIST_APP.TXT Move pipe, open, and getdents from the APP to COMMON seccomp whitelist. 2018-09-11 19:20:34 -04:00
SECCOMP_WHITELIST_COMMON.TXT Add memfd_create(2) and mlock2(2). 2019-08-05 16:31:08 -07:00
SECCOMP_WHITELIST_SYSTEM.TXT Add bpf syscall to seccomp whitelist 2018-01-18 12:08:34 -08:00
SYSCALLS.TXT Add memfd_create(2) and mlock2(2). 2019-08-05 16:31:08 -07:00
version_script.txt