Add another macro, _LIBUNWIND_SUPPORT_DWARF_SECTION, that indicates
that the location and length of .eh_frame is known, and that .eh_frame
should be scanned to find an FDE. When the unwinder can searchThere are a few reasons to turn this
it generally doesn't need to scan .eh_frame* When there is a valid .eh_frame_hdr section, and when itscanning .eh_frame is
finds the index via PT_GNU_EH_FRAME unnecessary.
* When .eh_frame is located using PT_GNU_EH_FRAME, the length of the
section is unknown.
* If the unwinder uses dl_iterate_phdr, it doesn't know the length ofthen entries that are
.eh_frame. When we use dl_iterate_phdr, we also don't want to add an automatically added to DwarfFDECache would become invalid if the
entry to module containing the DwarfFDECache,entry were unloaded. because the entry won't be removed if a(On Apple systems,
module is unloaded DwarfFDECache registers dyldUnloadHook to remove unloaded entries.)
* Omitting the dwarf_section and dwarf_section_length fields reduces
memory use in the FrameHeaderCache.
For a bare-metal target, the location of both .eh_frame and
.eh_frame_hdr is known, but maybe the .eh_frame_hdr is unused/empty,
so enable both methods. .eh_frame is only scanned if the index is
Replace a chain-of-ifdefs in a coupleAdd a new dso_length field to track the length of places by defining athe PT_LOAD segment
_LIBUNWIND_USE_DL_ITERATE_PHDR macro in config.h.used by the FrameHeaderCache. Previously, I also define athe FrameHeaderCache used the
_LIBUNWIND_USE_DL_UNWIND_FIND_EXIDX macro to factor out
(_LIBUNWIND_ARM_EHABI and __BIONIC__)dwarf_section_length field for this purpose.
Fix the calculation of ehSectionEnd in CFI_Parser<A>::findFDE.
Minor change: Stop defining the ElfW macro for _WIN32Above the dso_base field declaration, remove the redundant reference to
_LIBUNWIND_SUPPORT_DWARF_INDEX. If _LIBUNWIND_SUPPORT_DWARF_INDEX is
defined, then _LIBUNWIND_SUPPORT_DWARF_UNWIND is also defined.
This change fixes: