[llvm] [llvm-readobj] Dump callgraph section info for ELF (PR #157499)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 14:06:11 PDT 2025


================
@@ -0,0 +1,191 @@
+## Tests --call-graph-info prints information from call graph section.
+
+# REQUIRES: x86-registered-target
+
+# RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t
+# RUN: llvm-readelf --call-graph-info %t 2>&1 | FileCheck %s -DFILE=%t --match-full-lines
+# RUN: llvm-readelf --elf-output-style=LLVM --call-graph-info %t 2>&1 | FileCheck %s --match-full-lines -DFILE=%t --check-prefix=LLVM
+# RUN: llvm-readelf --elf-output-style=JSON --pretty-print --call-graph-info %t 2>&1 | FileCheck %s --match-full-lines -DFILE=%t --check-prefix=JSON
+
+# CHECK: {{.*}}llvm-readelf{{.*}}: warning: '[[FILE]]': .callgraph section has unknown type id for 1 indirect targets.
----------------
ilovepi wrote:

```suggestion

# CHECK:  warning: '[[FILE]]': .callgraph section has unknown type id for 1 indirect targets.
```

I don't think you need to check the tool's name do you? What's the convention in other tests? 

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


More information about the llvm-commits mailing list