diff options
author | Dan Albert <danalbert@google.com> | 2017-11-01 21:26:06 +0000 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-04-26 15:51:57 -0700 |
commit | 824aaa36e08b25a648562dc8ba0b2797d85a5153 (patch) | |
tree | 9dc6918d3d5d50b5c29539e6275d0823eba94ebe | |
parent | d37f5a6ecfeafaf21aeea4ce65031d2224ccfc94 (diff) | |
download | libunwind_llvm-ndk-release-r20.tar.gz |
[libunwind] Don't use dl_iterate_phdr if __ANDROID_API__ < 21ndk-r21-rc1ndk-r21-beta2ndk-r21-beta1ndk-r21ndk-r20bndk-r20-beta3ndk-r20-beta2ndk-r20-beta1ndk-r20ndk-r19cndk-r19bndk-r19-beta2ndk-r19-beta1ndk-r19ndk-r18bndk-r18-beta2ndk-r18-beta1ndk-release-r20ndk-release-r19ndk-release-r18
Summary:
On ARM, dl_iterate_phdr is only implemented in the Android NDK version 21 or later:
https://android.googlesource.com/platform/prebuilts/ndk/+/dev/platform/sysroot/usr/include/link.h#55
Reviewers: thakis, danalbert
Reviewed By: danalbert
Subscribers: dtzWill, aemerson, srhines, kristof.beyls
Differential Revision: https://reviews.llvm.org/D39468
Change-Id: I770aad7d7d58f6787f9ecd38b83e0ffe44792392
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@317125 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | src/AddressSpace.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/AddressSpace.hpp b/src/AddressSpace.hpp index f0091fc..acf0a44 100644 --- a/src/AddressSpace.hpp +++ b/src/AddressSpace.hpp @@ -383,6 +383,14 @@ inline bool LocalAddressSpace::findUnwindSections(pint_t targetAddr, info.arm_section, info.arm_section_length); if (info.arm_section && info.arm_section_length) return true; +#elif defined(_LIBUNWIND_ARM_EHABI) && defined(__BIONIC__) && \ + (__ANDROID_API__ < 21) + int length = 0; + info.arm_section = + (uintptr_t)dl_unwind_find_exidx((_Unwind_Ptr)targetAddr, &length); + info.arm_section_length = (uintptr_t)length; + if (info.arm_section && info.arm_section_length) + return true; #elif _LIBUNWIND_SUPPORT_DWARF_UNWIND #if _LIBUNWIND_SUPPORT_DWARF_INDEX struct dl_iterate_cb_data { |