git: 642f77be1d10 - main - amd64 sigtramp: comment-out annotations for registers with DWARF number >= 32
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jan 2022 19:01:05 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=642f77be1d10b57cd7635573aa8a3757913778ad
commit 642f77be1d10b57cd7635573aa8a3757913778ad
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-02 18:39:07 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-01-02 19:00:52 +0000
amd64 sigtramp: comment-out annotations for registers with DWARF number >= 32
Sponsored by: The FreeBSD Foundation
---
sys/amd64/amd64/sigtramp.S | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys/amd64/amd64/sigtramp.S b/sys/amd64/amd64/sigtramp.S
index 6c2895a14a0a..f951ee14c2f7 100644
--- a/sys/amd64/amd64/sigtramp.S
+++ b/sys/amd64/amd64/sigtramp.S
@@ -67,6 +67,9 @@ ENTRY(__vdso_sigcode)
* Clang IAS + ld.lld combination cannot handle any of the segment
* registers. Also, clang IAS does not know %rflags/%fs.base/%gs.base
* registers names, use dwarf registers numbers from psABI directly.
+ *
+ * LLVM libunwind from stable/13 cannot parse register numbers higher
+ * than 32. Disable %rflags, %fs.base, and %gs.base annotations.
*/
.cfi_offset %fs, SIGF_UC + UC_FS
.cfi_offset %gs, SIGF_UC + UC_GS
@@ -76,14 +79,14 @@ ENTRY(__vdso_sigcode)
.cfi_offset %rip, SIGF_UC + UC_RIP
#if 0
.cfi_offset %cs, SIGF_UC + UC_CS
-#endif
.cfi_offset 49 /* %rflags */, SIGF_UC + UC_RFLAGS
+#endif
.cfi_offset %rsp, SIGF_UC + UC_RSP
#if 0
.cfi_offset %ss, SIGF_UC + UC_SS
-#endif
.cfi_offset 58 /* %fs.base */, SIGF_UC + UC_FSBASE
.cfi_offset 59 /* %gs.base */, SIGF_UC + UC_GSBASE
+#endif
call *SIGF_HANDLER(%rsp) /* call signal handler */
lea SIGF_UC(%rsp),%rdi /* get ucontext_t */
pushq $0 /* junk to fake return addr. */