xref: /llvm-project/lld/test/ELF/Inputs/debug-names-a.s (revision 16711b431b843dd2143d38fdf6b0591dfb1783e0)
1.ifdef GEN
2#--- a.cc
3struct t1 {};
4extern "C" void _start(t1) {}
5#--- gen
6clang --target=x86_64-linux -S -g -gpubnames a.cc -o -
7.endif
8	.text
9	.file	"a.cc"
10	.globl	_start                          # -- Begin function _start
11	.p2align	4, 0x90
12	.type	_start,@function
13_start:                                 # @_start
14.Lfunc_begin0:
15	.file	0 "/proc/self/cwd" "a.cc" md5 0x6835f89a7d36054002b51e54e47d852e
16	.loc	0 2 0                           # a.cc:2:0
17	.cfi_startproc
18# %bb.0:                                # %entry
19	pushq	%rbp
20	.cfi_def_cfa_offset 16
21	.cfi_offset %rbp, -16
22	movq	%rsp, %rbp
23	.cfi_def_cfa_register %rbp
24.Ltmp0:
25	.loc	0 2 29 prologue_end epilogue_begin # a.cc:2:29
26	popq	%rbp
27	.cfi_def_cfa %rsp, 8
28	retq
29.Ltmp1:
30.Lfunc_end0:
31	.size	_start, .Lfunc_end0-_start
32	.cfi_endproc
33                                        # -- End function
34	.section	.debug_abbrev,"",@progbits
35	.byte	1                               # Abbreviation Code
36	.byte	17                              # DW_TAG_compile_unit
37	.byte	1                               # DW_CHILDREN_yes
38	.byte	37                              # DW_AT_producer
39	.byte	37                              # DW_FORM_strx1
40	.byte	19                              # DW_AT_language
41	.byte	5                               # DW_FORM_data2
42	.byte	3                               # DW_AT_name
43	.byte	37                              # DW_FORM_strx1
44	.byte	114                             # DW_AT_str_offsets_base
45	.byte	23                              # DW_FORM_sec_offset
46	.byte	16                              # DW_AT_stmt_list
47	.byte	23                              # DW_FORM_sec_offset
48	.byte	27                              # DW_AT_comp_dir
49	.byte	37                              # DW_FORM_strx1
50	.byte	17                              # DW_AT_low_pc
51	.byte	27                              # DW_FORM_addrx
52	.byte	18                              # DW_AT_high_pc
53	.byte	6                               # DW_FORM_data4
54	.byte	115                             # DW_AT_addr_base
55	.byte	23                              # DW_FORM_sec_offset
56	.byte	0                               # EOM(1)
57	.byte	0                               # EOM(2)
58	.byte	2                               # Abbreviation Code
59	.byte	46                              # DW_TAG_subprogram
60	.byte	1                               # DW_CHILDREN_yes
61	.byte	17                              # DW_AT_low_pc
62	.byte	27                              # DW_FORM_addrx
63	.byte	18                              # DW_AT_high_pc
64	.byte	6                               # DW_FORM_data4
65	.byte	64                              # DW_AT_frame_base
66	.byte	24                              # DW_FORM_exprloc
67	.byte	3                               # DW_AT_name
68	.byte	37                              # DW_FORM_strx1
69	.byte	58                              # DW_AT_decl_file
70	.byte	11                              # DW_FORM_data1
71	.byte	59                              # DW_AT_decl_line
72	.byte	11                              # DW_FORM_data1
73	.byte	63                              # DW_AT_external
74	.byte	25                              # DW_FORM_flag_present
75	.byte	0                               # EOM(1)
76	.byte	0                               # EOM(2)
77	.byte	3                               # Abbreviation Code
78	.byte	5                               # DW_TAG_formal_parameter
79	.byte	0                               # DW_CHILDREN_no
80	.byte	2                               # DW_AT_location
81	.byte	24                              # DW_FORM_exprloc
82	.byte	58                              # DW_AT_decl_file
83	.byte	11                              # DW_FORM_data1
84	.byte	59                              # DW_AT_decl_line
85	.byte	11                              # DW_FORM_data1
86	.byte	73                              # DW_AT_type
87	.byte	19                              # DW_FORM_ref4
88	.byte	0                               # EOM(1)
89	.byte	0                               # EOM(2)
90	.byte	4                               # Abbreviation Code
91	.byte	19                              # DW_TAG_structure_type
92	.byte	0                               # DW_CHILDREN_no
93	.byte	54                              # DW_AT_calling_convention
94	.byte	11                              # DW_FORM_data1
95	.byte	3                               # DW_AT_name
96	.byte	37                              # DW_FORM_strx1
97	.byte	11                              # DW_AT_byte_size
98	.byte	11                              # DW_FORM_data1
99	.byte	58                              # DW_AT_decl_file
100	.byte	11                              # DW_FORM_data1
101	.byte	59                              # DW_AT_decl_line
102	.byte	11                              # DW_FORM_data1
103	.byte	0                               # EOM(1)
104	.byte	0                               # EOM(2)
105	.byte	0                               # EOM(3)
106	.section	.debug_info,"",@progbits
107.Lcu_begin0:
108	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
109.Ldebug_info_start0:
110	.short	5                               # DWARF version number
111	.byte	1                               # DWARF Unit Type
112	.byte	8                               # Address Size (in bytes)
113	.long	.debug_abbrev                   # Offset Into Abbrev. Section
114	.byte	1                               # Abbrev [1] 0xc:0x34 DW_TAG_compile_unit
115	.byte	0                               # DW_AT_producer
116	.short	33                              # DW_AT_language
117	.byte	1                               # DW_AT_name
118	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
119	.long	.Lline_table_start0             # DW_AT_stmt_list
120	.byte	2                               # DW_AT_comp_dir
121	.byte	0                               # DW_AT_low_pc
122	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
123	.long	.Laddr_table_base0              # DW_AT_addr_base
124	.byte	2                               # Abbrev [2] 0x23:0x16 DW_TAG_subprogram
125	.byte	0                               # DW_AT_low_pc
126	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
127	.byte	1                               # DW_AT_frame_base
128	.byte	86
129	.byte	3                               # DW_AT_name
130	.byte	0                               # DW_AT_decl_file
131	.byte	2                               # DW_AT_decl_line
132                                        # DW_AT_external
133	.byte	3                               # Abbrev [3] 0x2e:0xa DW_TAG_formal_parameter
134	.byte	2                               # DW_AT_location
135	.byte	145
136	.byte	127
137	.byte	0                               # DW_AT_decl_file
138	.byte	2                               # DW_AT_decl_line
139	.long	57                              # DW_AT_type
140	.byte	0                               # End Of Children Mark
141	.byte	4                               # Abbrev [4] 0x39:0x6 DW_TAG_structure_type
142	.byte	5                               # DW_AT_calling_convention
143	.byte	4                               # DW_AT_name
144	.byte	1                               # DW_AT_byte_size
145	.byte	0                               # DW_AT_decl_file
146	.byte	1                               # DW_AT_decl_line
147	.byte	0                               # End Of Children Mark
148.Ldebug_info_end0:
149	.section	.debug_str_offsets,"",@progbits
150	.long	24                              # Length of String Offsets Set
151	.short	5
152	.short	0
153.Lstr_offsets_base0:
154	.section	.debug_str,"MS",@progbits,1
155.Linfo_string0:
156	.byte	0                               # string offset=0
157.Linfo_string1:
158	.asciz	"a.cc"                          # string offset=1
159.Linfo_string2:
160	.asciz	"/proc/self/cwd"                # string offset=6
161.Linfo_string3:
162	.asciz	"_start"                        # string offset=21
163.Linfo_string4:
164	.asciz	"t1"                            # string offset=28
165	.section	.debug_str_offsets,"",@progbits
166	.long	.Linfo_string0
167	.long	.Linfo_string1
168	.long	.Linfo_string2
169	.long	.Linfo_string3
170	.long	.Linfo_string4
171	.section	.debug_addr,"",@progbits
172	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
173.Ldebug_addr_start0:
174	.short	5                               # DWARF version number
175	.byte	8                               # Address size
176	.byte	0                               # Segment selector size
177.Laddr_table_base0:
178	.quad	.Lfunc_begin0
179.Ldebug_addr_end0:
180	.section	.debug_names,"",@progbits
181	.long	.Lnames_end0-.Lnames_start0     # Header: unit length
182.Lnames_start0:
183	.short	5                               # Header: version
184	.short	0                               # Header: padding
185	.long	1                               # Header: compilation unit count
186	.long	0                               # Header: local type unit count
187	.long	0                               # Header: foreign type unit count
188	.long	2                               # Header: bucket count
189	.long	2                               # Header: name count
190	.long	.Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size
191	.long	8                               # Header: augmentation string size
192	.ascii	"LLVM0700"                      # Header: augmentation string
193	.long	.Lcu_begin0                     # Compilation unit 0
194	.long	1                               # Bucket 0
195	.long	0                               # Bucket 1
196	.long	5863786                         # Hash in Bucket 0
197	.long	-304389582                      # Hash in Bucket 0
198	.long	.Linfo_string4                  # String in Bucket 0: t1
199	.long	.Linfo_string3                  # String in Bucket 0: _start
200	.long	.Lnames1-.Lnames_entries0       # Offset in Bucket 0
201	.long	.Lnames0-.Lnames_entries0       # Offset in Bucket 0
202.Lnames_abbrev_start0:
203	.byte	1                               # Abbrev code
204	.byte	19                              # DW_TAG_structure_type
205	.byte	3                               # DW_IDX_die_offset
206	.byte	19                              # DW_FORM_ref4
207	.byte	4                               # DW_IDX_parent
208	.byte	25                              # DW_FORM_flag_present
209	.byte	0                               # End of abbrev
210	.byte	0                               # End of abbrev
211	.byte	2                               # Abbrev code
212	.byte	46                              # DW_TAG_subprogram
213	.byte	3                               # DW_IDX_die_offset
214	.byte	19                              # DW_FORM_ref4
215	.byte	4                               # DW_IDX_parent
216	.byte	25                              # DW_FORM_flag_present
217	.byte	0                               # End of abbrev
218	.byte	0                               # End of abbrev
219	.byte	0                               # End of abbrev list
220.Lnames_abbrev_end0:
221.Lnames_entries0:
222.Lnames1:
223.L1:
224	.byte	1                               # Abbreviation code
225	.long	57                              # DW_IDX_die_offset
226	.byte	0                               # DW_IDX_parent
227                                        # End of list: t1
228.Lnames0:
229.L0:
230	.byte	2                               # Abbreviation code
231	.long	35                              # DW_IDX_die_offset
232	.byte	0                               # DW_IDX_parent
233                                        # End of list: _start
234	.p2align	2, 0x0
235.Lnames_end0:
236	.section	".note.GNU-stack","",@progbits
237	.addrsig
238	.section	.debug_line,"",@progbits
239.Lline_table_start0:
240