summaryrefslogtreecommitdiffstats
path: root/libunwind/src/DwarfParser.hpp
diff options
context:
space:
mode:
authorLuke Cheeseman <luke.cheeseman@arm.com>2018-09-24 15:55:35 +0000
committerLuke Cheeseman <luke.cheeseman@arm.com>2018-09-24 15:55:35 +0000
commit8284b19c76a7bafdf4e53b3deb6cd35fcd370e92 (patch)
tree591a63cfc1252ed5c2339baf8b95aedf85097350 /libunwind/src/DwarfParser.hpp
parent3cb18346d776cc61da0bc5ea41e4678c1851db68 (diff)
downloadbcm5719-llvm-8284b19c76a7bafdf4e53b3deb6cd35fcd370e92.tar.gz
bcm5719-llvm-8284b19c76a7bafdf4e53b3deb6cd35fcd370e92.zip
[AArch64] Unwinding support for return address signing
- When return address signing is enabled, the LR may be signed on function entry - When an exception is thrown the return address is inspected used to unwind the call stack - Before this happens, the return address must be correctly authenticated to avoid causing an abort by dereferencing the signed pointer Differential Revision: https://reviews.llvm.org/D51432 llvm-svn: 342895
Diffstat (limited to 'libunwind/src/DwarfParser.hpp')
-rw-r--r--libunwind/src/DwarfParser.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libunwind/src/DwarfParser.hpp b/libunwind/src/DwarfParser.hpp
index b749b7776e1..68506a35053 100644
--- a/libunwind/src/DwarfParser.hpp
+++ b/libunwind/src/DwarfParser.hpp
@@ -666,6 +666,14 @@ bool CFI_Parser<A>::parseInstructions(A &addressSpace, pint_t instructions,
_LIBUNWIND_TRACE_DWARF(
"DW_CFA_GNU_negative_offset_extended(%" PRId64 ")\n", offset);
break;
+
+#if defined(_LIBUNWIND_TARGET_AARCH64)
+ case DW_CFA_AARCH64_negate_ra_state:
+ results->savedRegisters[UNW_ARM64_RA_SIGN_STATE].value ^= 0x1;
+ _LIBUNWIND_TRACE_DWARF("DW_CFA_AARCH64_negate_ra_state\n");
+ break;
+#endif
+
default:
operand = opcode & 0x3F;
switch (opcode & 0xC0) {
OpenPOWER on IntegriCloud