diff --git a/libunwind/src/AddressSpace.hpp b/libunwind/src/AddressSpace.hpp --- a/libunwind/src/AddressSpace.hpp +++ b/libunwind/src/AddressSpace.hpp @@ -584,11 +584,6 @@ // support for _dl_find_object on other unwind formats is not implemented, // yet. #if defined(DLFO_STRUCT_HAS_EH_DBASE) & defined(_LIBUNWIND_SUPPORT_DWARF_INDEX) - // We expect to run on a platform which does not use a base address for - // exception information. -#if DLFO_STRUCT_HAS_EH_DBASE -#error dlfo_eh_dbase is not supported for DWARF-based unwinding -#endif // We expect `_dl_find_object` to return PT_GNU_EH_FRAME. #if DLFO_EH_SEGMENT_TYPE != PT_GNU_EH_FRAME #error _dl_find_object retrieves an unexpected section type @@ -611,6 +606,11 @@ // Found an entry for `targetAddr`, but there is no unwind info. return false; } +#if DLFO_STRUCT_HAS_EH_DBASE + assert(findResult.dlfo_eh_dbase == findResult.dlfo_map_start && + "libunwind expects the base address for DW_EH_PE_datarel to be identical" + "with the start address of the PT_GNU_EH_FRAME segment") ; +#endif info.dso_base = reinterpret_cast(findResult.dlfo_map_start); info.text_segment_length = static_cast( (char *)findResult.dlfo_map_end - (char *)findResult.dlfo_map_start);