[lld] [lld][ELF] Implement merged .debug_names section. (PR #86508)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 22:12:13 PDT 2024
================
@@ -0,0 +1,189 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t1.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %p/Inputs/debug-names-2.s -o %t2.o
+# RUN: ld.lld --debug-names %t1.o %t2.o -o %t
+
+# RUN: llvm-dwarfdump -debug-names %t | FileCheck %s --check-prefix=DWARF
+
+# DWARF: .debug_names contents:
+# DWARF: Name Index @ 0x0 {
+# DWARF-NEXT: Header {
+# DWARF-NEXT: Length: 0xCC
+# DWARF-NEXT: Format: DWARF32
+# DWARF-NEXT: Version: 5
+# DWARF-NEXT: CU count: 2
+# DWARF-NEXT: Local TU count: 0
+# DWARF-NEXT: Foreign TU count: 0
+# DWARF-NEXT: Bucket count: 5
+# DWARF-NEXT: Name count: 5
+# DWARF-NEXT: Abbreviations table size: 0x1F
+# DWARF-NEXT: Augmentation: ' '
+# DWARF: Compilation Unit offsets [
+# DWARF-NEXT: CU[0]: 0x00000000
+# DWARF-NEXT: CU[1]: 0x00000041
+
+##
----------------
MaskRay wrote:
We typically place such file-level comments at the top. Don't add `^##$` lines.
Follow the convention of recent test files.
https://github.com/llvm/llvm-project/pull/86508
More information about the llvm-commits
mailing list