libgcc: Use _dl_find_object in _Unwind_Find_FDE

libgcc/ChangeLog:

	* unwind-dw2-fde-dip.c (_Unwind_Find_FDE): Call _dl_find_object
	if available.
This commit is contained in:
Florian Weimer 2022-01-04 15:47:30 +01:00
parent be661959a6
commit 790854ea76
1 changed files with 18 additions and 0 deletions

View File

@ -504,6 +504,24 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
if (ret != NULL) if (ret != NULL)
return ret; return ret;
/* Use DLFO_STRUCT_HAS_EH_DBASE as a proxy for the existence of a glibc-style
_dl_find_object function. */
#ifdef DLFO_STRUCT_HAS_EH_DBASE
{
struct dl_find_object dlfo;
if (_dl_find_object (pc, &dlfo) == 0)
return find_fde_tail ((_Unwind_Ptr) pc, dlfo.dlfo_eh_frame,
# if DLFO_STRUCT_HAS_EH_DBASE
(_Unwind_Ptr) dlfo.dlfo_eh_dbase,
# else
NULL,
# endif
bases);
else
return NULL;
}
#endif /* DLFO_STRUCT_HAS_EH_DBASE */
data.pc = (_Unwind_Ptr) pc; data.pc = (_Unwind_Ptr) pc;
#if NEED_DBASE_MEMBER #if NEED_DBASE_MEMBER
data.dbase = NULL; data.dbase = NULL;