[libcxx-commits] [PATCH] D87880: [libunwind] Combine dl_iterate_phdr codepaths for DWARF and EHABI

Ryan Prichard via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 17 21:16:02 PDT 2020


rprichard created this revision.
rprichard added reviewers: compnerd, mstorsjo, danielkiss.
Herald added subscribers: libcxx-commits, llvm-commits, kristof.beyls.
Herald added projects: LLVM, libunwind.
Herald added a reviewer: libunwind.
rprichard requested review of this revision.

dl_iterate_phdr is used to search for unwind info provided by either
PT_GNU_EH_FRAME or PT_ARM_EXIDX. Most of the code between the two is
the same, so combine them, and factor out what's different into
checkForUnwindInfoSegment.

Details:

- The FrameHeaderCache can now be enabled for ARM EHABI.
- findUnwindSectionsByPhdr now finds the last PT_ARM_EXIDX rather than the first. There should only be one segment.
- The dso_base and text_segment_length fields of UnwindInfoSections are now needed for dl_iterate_phdr when using EHABI, to hold the low and high PC values for a cache entry.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87880

Files:
  libunwind/src/AddressSpace.hpp
  libunwind/test/frameheadercache_test.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87880.292701.patch
Type: text/x-patch
Size: 6678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200918/8dab0b9c/attachment.bin>


More information about the libcxx-commits mailing list