]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgcc: Split FDE search code from PT_GNU_EH_FRAME lookup
authorFlorian Weimer <fweimer@redhat.com>
Thu, 25 Nov 2021 17:40:51 +0000 (18:40 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 25 Nov 2021 17:43:55 +0000 (18:43 +0100)
commit9488d24206687be80443dafdb2cdfc4ff3aca28c
tree1d811c01fbff03e3c021ad0ce041846e58f7cd48
parent5bc4cb04127a4805b6228b0a6cbfebdbd61314d2
libgcc: Split FDE search code from PT_GNU_EH_FRAME lookup

This allows switching to a different implementation for
PT_GNU_EH_FRAME lookup in a subsequent commit.

This moves some of the PT_GNU_EH_FRAME parsing out of the glibc loader
lock that is implied by dl_iterate_phdr.  However, the FDE is already
parsed outside the lock before this change, so this does not introduce
additional crashes in case of a concurrent dlclose.

libgcc/ChangeLog:

* unwind-dw2-fde-dip.c (struct unw_eh_callback_data): Add hdr.
Remove func, ret.
(find_fde_tail): New function.  Split from
_Unwind_IteratePhdrCallback.  Move the result initialization
from _Unwind_Find_FDE.
(_Unwind_Find_FDE): Updated to call find_fde_tail.
libgcc/unwind-dw2-fde-dip.c