[llvm] [BOLT][AArch64] Support for pointer authentication (v2) (PR #120064)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 08:00:06 PDT 2025


================
@@ -0,0 +1,114 @@
+#!/usr/bin/env python3
+
+# This tool helps matching dwarf dumps
+# (= the output from running llvm-objdump --dwarf=frames),
+# by address to function names (which are parsed from a normal objdump).
+# The script is used for checking if .cfi_negate_ra_state CFIs
+# are generated by BOLT the same way they are generated by LLVM.
+
+import argparse
+import subprocess
+import sys
+import re
+
+
+class NameDwarfPair(object):
+    def __init__(self, name, body):
+        self.name = name
+        self.body = body
+        self.finalized = False
+
+    def append(self, body_line):
+        # only store elements into the body until the first whitespace line is encountered.
+        if body_line.isspace():
+            self.finalized = True
+        if not self.finalized:
+            self.body += body_line
+
+    def print(self):
+        print(self.name)
+        print(self.body)
+
+    def parse_negates(self):
----------------
paschalis-mpeis wrote:

Consider adding a short description – you are summing the advance_loc entries and appending only when a negate_ra_state directive is found

https://github.com/llvm/llvm-project/pull/120064


More information about the llvm-commits mailing list