• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/gdb-index-multiple-cu-2.s -o %t1.o
4# RUN: ld.lld --gdb-index %t.o %t1.o -o %t
5# RUN: llvm-dwarfdump -gdb-index %t | FileCheck %s
6
7# %t.o has 2 CUs while %t1 has 1, thus _start in %t1.o should have cuIndex 2.
8# attributes << 24 | cuIndex = 48 << 24 | 2 = 0x30000002
9# CHECK:      Constant pool
10# CHECK-NEXT:   0(0x0): 0x30000002
11
12.section .debug_abbrev,"",@progbits
13	.byte	1              # Abbreviation Code
14	.byte	17             # DW_TAG_compile_unit
15	.byte	0              # DW_CHILDREN_yes
16	.byte	0              # EOM(1)
17	.byte	0              # EOM(2)
18	.byte	0
19
20.section .debug_info,"",@progbits
21.Lcu_begin0:
22	.long	.Lcu_end0 - .Lcu_begin0 - 4
23	.short	4              # DWARF version number
24	.long	0              # Offset Into Abbrev. Section
25	.byte	4              # Address Size
26	.byte	1              # Abbrev [1] DW_TAG_compile_unit
27	.byte	0
28.Lcu_end0:
29.Lcu_begin1:
30	.long	.Lcu_end1 - .Lcu_begin1 - 4
31	.short	4              # DWARF version number
32	.long	0              # Offset Into Abbrev. Section
33	.byte	4              # Address Size
34	.byte	1              # Abbrev [1] DW_TAG_compile_unit
35	.byte	0
36.Lcu_end1:
37