[llvm] [MC] Remove unused pre-created .llvm.callgraph section (PR #224369)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 19:52:47 PDT 2026


================
@@ -0,0 +1,35 @@
+# RUN: rm -rf %t && split-file %s %t && cd %t
+# RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
+# RUN: llvm-readelf -S a.o | FileCheck %s --check-prefix=PROGBITS
+# RUN: llvm-mc -filetype=obj -triple=x86_64 b.s -o b.o
+# RUN: llvm-readelf -S b.o | FileCheck %s --check-prefix=TYPED
+
+## Like GNU assembler, .llvm.callgraph without a type is SHT_PROGBITS, whether or
+## not "?" inherits a group. Specify %llvm_call_graph for SHT_LLVM_CALL_GRAPH.
+# PROGBITS:      .llvm.callgraph   PROGBITS        0000000000000000 {{.*}} 000001 00      0   0  1
+# PROGBITS:      .llvm.callgraph   PROGBITS        0000000000000000 {{.*}} 000001 00   G  0   0  1
+
+# TYPED:         .llvm.callgraph   LLVM_CALL_GRAPH 0000000000000000 {{.*}} 000001 00      0   0  1
+# TYPED:         .llvm.callgraph   LLVM_CALL_GRAPH 0000000000000000 {{.*}} 000001 00   G  0   0  1
+
+#--- a.s
+.section .text,"ax",%progbits
----------------
MaskRay wrote:

Done! Added another case.

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


More information about the llvm-commits mailing list