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

Gergely Bálint via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 01:56:35 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):
+        negate_offsets = []
+        loc = 0
+        # TODO: make sure this is not printed in hex
+        re_advloc = f"DW_CFA_advance_loc: (\d+)"
----------------
bgergely0 wrote:

Quite surprising to see that this works for me locally, and the CI tests also pass.

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


More information about the llvm-commits mailing list