llvm-project/libunwind
Ed Schouten fa1ef7d89c Drop the dependency on dl_unwind_find_exidx().
While porting libunwind over to CloudABI for ARMv6, I observed that this
source file doesn't build, as it depends on dl_unwind_find_exidx(),
which CloudABI's C library was lacking. After I added that function, I
still needed to patch up libunwind to define _Unwind_Ptr.

Taking a step back, I wonder why we need to make use of this function
anyway. The unwinder already has some nice code to use dl_iterate_phdr()
to scan for a PT_GNU_EH_FRAME header. The dl_unwind_find_exidx() does
the same thing, except matching PT_ARM_EXIDX instead. We could also do
that ourselves.

This change gets rid of the dl_unwind_find_exidx() call and extends the
dl_iterate_phdr() loop. This approach has the advantage of getting rid
of some of those OS-specific #ifdefs. This now means that if an
operating system only provides dl_iterate_phdr(), it gets support for
unwinding on all architectures. There is no need to add more stuff, just
to get ARMv6 support.

This change is identical to r295944, except that it now adds the
necessary code to do bounds checking on PT_LOAD. The previous version of
this change lacked this, which didn't cause any problems on CloudABI,
but did break the Linux build bots. This is why I reverted it in
r295948.

Differential Revision:	https://reviews.llvm.org/D30306

llvm-svn: 296991
2017-03-05 19:11:24 +00:00
..
cmake [CMake] Get libunwind building under LLVM/runtimes 2016-11-08 23:02:49 +00:00
include X86: swap EBP, ESP on !APPLE 2017-01-21 16:22:59 +00:00
src Drop the dependency on dl_unwind_find_exidx(). 2017-03-05 19:11:24 +00:00
test [libunwind] Properly align _Unwind_Exception. 2016-07-20 23:56:42 +00:00
.arcconfig Update .arcconfig 2016-07-20 23:56:17 +00:00
.clang-format unwind: add a .clang-format 2015-05-07 19:50:18 +00:00
CMakeLists.txt [libunwind][CMake] Use libc++ headers when available 2017-02-16 05:18:08 +00:00
LICENSE.TXT Fix the project name in the license file. 2017-02-27 17:47:58 +00:00