Author: danalbert Date: Wed Nov 1 14:26:06 2017 New Revision: 317125 URL: http://llvm.org/viewvc/llvm-project?rev=317125&view=rev Log: [libunwind] Don't use dl_iterate_phdr if __ANDROID_API__ < 21
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 Modified: libunwind/trunk/src/AddressSpace.hpp Modified: libunwind/trunk/src/AddressSpace.hpp URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/AddressSpace.hpp?rev=317125&r1=317124&r2=317125&view=diff ============================================================================== --- libunwind/trunk/src/AddressSpace.hpp (original) +++ libunwind/trunk/src/AddressSpace.hpp Wed Nov 1 14:26:06 2017 @@ -393,6 +393,14 @@ inline bool LocalAddressSpace::findUnwin } } return false; +#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 defined(_LIBUNWIND_ARM_EHABI) || defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND) struct dl_iterate_cb_data { LocalAddressSpace *addressSpace; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits