ntdll: Implement ARM EHABI unwinding.
commita27b202a4ddc314e3e856c10f2e5d010c4a88ee0
authorMartin Storsjö <martin@martin.st>
Tue, 18 Oct 2022 19:55:47 +0000 (18 22:55 +0300)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 7 Nov 2022 19:15:02 +0000 (7 20:15 +0100)
tree041c63096094b6bdc56cbfc4c13fc07fee1c0a3f
parentf760976803346fb2308d4c3c9e6f8ad360e62dfd
ntdll: Implement ARM EHABI unwinding.

This avoids relying on libunwind, which isn't always available,
and which can be brittle (e.g. current git master of libunwind fails, see
https://github.com/libunwind/libunwind/pull/203#issuecomment-984126066).

This allows unwinding with the EXIDX/EXTBL info which is used
normally for C++ exception handling/unwinding. This avoids needing
to keep the .so files unstripped and avoids needing libunwind to
load .debug_frame from disk instead of the already mapped
EXIDX/EXTBL.

This patch uses the dl_iterate_phdr function for finding the EXIDX
section; keeping this call within #ifdef linux to avoid breaking
someone's build, even though it probably is available on most unix
(or ELF) platforms.

Alternatively, we could add configure checks for this function.

This passes all my unwinding tests, for full ELF builds of Wine,
built with both GCC and Clang. (It also works for PE builds, where
only very few ELF bits need to be unwound.)

Signed-off-by: Martin Storsjö <martin@martin.st>
dlls/ntdll/unix/signal_arm.c