Rework findUnwindSectionsByPhdr to be more optimal.

Summary:
- Executable segment is usually segment 3. Look there for the address first.
- GNU_EH_FRAME_HEADER segment is usually near the end. Iterate from the end.
- Exit early if both phdrs have been found.

This is the last cl before a patch to cache the information this function
finds.

Subscribers: libcxx-commits

Tags: #libc

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

GitOrigin-RevId: d67cf7a0a970df6e69db437514bf61a2ab283e67
1 file changed
tree: 7825438a5c5ff8c1b8bfae828bec3bd5a7ce0aab
  1. cmake/
  2. docs/
  3. include/
  4. src/
  5. test/
  6. .clang-format
  7. CMakeLists.txt
  8. LICENSE.TXT