Module: wine Branch: master Commit: a27b202a4ddc314e3e856c10f2e5d010c4a88ee0 URL: https://gitlab.winehq.org/wine/wine/-/commit/a27b202a4ddc314e3e856c10f2e5d01...
Author: Martin Storsjö martin@martin.st Date: Tue Oct 18 22:55:47 2022 +0300
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 | 448 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 439 insertions(+), 9 deletions(-)