1# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj -o - | \
2# RUN: llvm-dwarfdump - | FileCheck %s
3
4# This test simulates the result of ld -r. That produces files where
5# abbr_offset is not zero.
6
7# CHECK: abbr_offset = 0x0000
8# CHECK: abbr_offset = 0x0008
9
10       	.section	.debug_abbrev,"",@progbits
11.Labbrev1:
12	.byte	1                       # Abbreviation Code
13	.byte	17                      # DW_TAG_compile_unit
14	.byte	0                       # DW_CHILDREN_no
15	.byte	16                      # DW_AT_stmt_list
16	.byte	23                      # DW_FORM_sec_offset
17	.byte	0                       # EOM(1)
18	.byte	0                       # EOM(2)
19	.byte	0                       # EOM(3)
20
21.Labbrev2:
22	.byte	1                       # Abbreviation Code
23	.byte	17                      # DW_TAG_compile_unit
24	.byte	0                       # DW_CHILDREN_no
25	.byte	16                      # DW_AT_stmt_list
26	.byte	23                      # DW_FORM_sec_offset
27	.byte	0                       # EOM(1)
28	.byte	0                       # EOM(2)
29	.byte	0                       # EOM(3)
30
31	.section	.debug_info,"",@progbits
32	.long	.Lend0 - .Lbegin0       # Length of Unit
33.Lbegin0:
34	.short	4                       # DWARF version number
35	.long	.Labbrev1               # Offset Into Abbrev. Section
36	.byte	8                       # Address Size (in bytes)
37	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
38	.long	.Lline_table_start0     # DW_AT_stmt_list
39.Lend0:
40
41       	.long	.Lend1 - .Lbegin1       # Length of Unit
42.Lbegin1:
43	.short	4                       # DWARF version number
44	.long	.Labbrev2               # Offset Into Abbrev. Section
45	.byte	8                       # Address Size (in bytes)
46	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
47	.long	.Lline_table_start0     # DW_AT_stmt_list
48.Lend1:
49
50	.section	.debug_line,"",@progbits
51.Lline_table_start0:
52