xref: /llvm-project/bolt/test/X86/Inputs/dwarf5-df-output-dir-same-name-main.s (revision ce17c6d3bac5e27212a17b4534d09d97ab40c386)
1# clang++ main.cpp -g2 -gsplit-dwarf -S -fdebug-compilation-dir=.
2# Modified assembly so that DW_AT_dwo_name has a partial path.
3# int main() { return 0; }
4
5	.text
6	.file	"main.cpp"
7	.globl	main                            # -- Begin function main
8	.p2align	4, 0x90
9	.type	main,@function
10main:                                   # @main
11.Lfunc_begin0:
12	.file	0 "." "main.cpp" md5 0xbb12fec8d002b1f0e06f7dee4604c6cc
13	.loc	0 1 0                           # main.cpp:1:0
14	.cfi_startproc
15# %bb.0:                                # %entry
16	pushq	%rbp
17	.cfi_def_cfa_offset 16
18	.cfi_offset %rbp, -16
19	movq	%rsp, %rbp
20	.cfi_def_cfa_register %rbp
21	movl	$0, -4(%rbp)
22.Ltmp0:
23	.loc	0 2 3 prologue_end              # main.cpp:2:3
24	xorl	%eax, %eax
25	.loc	0 2 3 epilogue_begin is_stmt 0  # main.cpp:2:3
26	popq	%rbp
27	.cfi_def_cfa %rsp, 8
28	retq
29.Ltmp1:
30.Lfunc_end0:
31	.size	main, .Lfunc_end0-main
32	.cfi_endproc
33                                        # -- End function
34	.section	.debug_abbrev,"",@progbits
35	.byte	1                               # Abbreviation Code
36	.byte	74                              # DW_TAG_skeleton_unit
37	.byte	0                               # DW_CHILDREN_no
38	.byte	16                              # DW_AT_stmt_list
39	.byte	23                              # DW_FORM_sec_offset
40	.byte	114                             # DW_AT_str_offsets_base
41	.byte	23                              # DW_FORM_sec_offset
42	.byte	27                              # DW_AT_comp_dir
43	.byte	37                              # DW_FORM_strx1
44	.ascii	"\264B"                         # DW_AT_GNU_pubnames
45	.byte	25                              # DW_FORM_flag_present
46	.byte	118                             # DW_AT_dwo_name
47	.byte	37                              # DW_FORM_strx1
48	.byte	17                              # DW_AT_low_pc
49	.byte	27                              # DW_FORM_addrx
50	.byte	18                              # DW_AT_high_pc
51	.byte	6                               # DW_FORM_data4
52	.byte	115                             # DW_AT_addr_base
53	.byte	23                              # DW_FORM_sec_offset
54	.byte	0                               # EOM(1)
55	.byte	0                               # EOM(2)
56	.byte	0                               # EOM(3)
57	.section	.debug_info,"",@progbits
58.Lcu_begin0:
59	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
60.Ldebug_info_start0:
61	.short	5                               # DWARF version number
62	.byte	4                               # DWARF Unit Type
63	.byte	8                               # Address Size (in bytes)
64	.long	.debug_abbrev                   # Offset Into Abbrev. Section
65	.quad	6318074710904753300
66	.byte	1                               # Abbrev [1] 0x14:0x14 DW_TAG_skeleton_unit
67	.long	.Lline_table_start0             # DW_AT_stmt_list
68	.long	.Lstr_offsets_base0             # DW_AT_str_offsets_base
69	.byte	0                               # DW_AT_comp_dir
70                                        # DW_AT_GNU_pubnames
71	.byte	1                               # DW_AT_dwo_name
72	.byte	0                               # DW_AT_low_pc
73	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
74	.long	.Laddr_table_base0              # DW_AT_addr_base
75.Ldebug_info_end0:
76	.section	.debug_str_offsets,"",@progbits
77	.long	12                              # Length of String Offsets Set
78	.short	5
79	.short	0
80.Lstr_offsets_base0:
81	.section	.debug_str,"MS",@progbits,1
82.Lskel_string0:
83	.asciz	"."                             # string offset=0
84.Lskel_string1:
85	.asciz	"objects/o1/split.dwo"                      # string offset=2 <--- Manually modified.
86	.section	.debug_str_offsets,"",@progbits
87	.long	.Lskel_string0
88	.long	.Lskel_string1
89	.section	.debug_str_offsets.dwo,"e",@progbits
90	.long	24                              # Length of String Offsets Set
91	.short	5
92	.short	0
93	.section	.debug_str.dwo,"eMS",@progbits,1
94.Linfo_string0:
95	.asciz	"main"                          # string offset=0
96.Linfo_string1:
97	.asciz	"int"                           # string offset=5
98.Linfo_string2:
99	.asciz	"clang version 18.0.0"          # string offset=9
100.Linfo_string3:
101	.asciz	"main.cpp"                      # string offset=30
102.Linfo_string4:
103	.asciz	"objects/o1/split.dwo"                      # string offset=39 <--- Manually modified.
104	.section	.debug_str_offsets.dwo,"e",@progbits
105	.long	0
106	.long	5
107	.long	9
108	.long	30
109	.long	39
110	.section	.debug_info.dwo,"e",@progbits
111	.long	.Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
112.Ldebug_info_dwo_start0:
113	.short	5                               # DWARF version number
114	.byte	5                               # DWARF Unit Type
115	.byte	8                               # Address Size (in bytes)
116	.long	0                               # Offset Into Abbrev. Section
117	.quad	6318074710904753300
118	.byte	1                               # Abbrev [1] 0x14:0x1a DW_TAG_compile_unit
119	.byte	2                               # DW_AT_producer
120	.short	33                              # DW_AT_language
121	.byte	3                               # DW_AT_name
122	.byte	4                               # DW_AT_dwo_name
123	.byte	2                               # Abbrev [2] 0x1a:0xf DW_TAG_subprogram
124	.byte	0                               # DW_AT_low_pc
125	.long	.Lfunc_end0-.Lfunc_begin0       # DW_AT_high_pc
126	.byte	1                               # DW_AT_frame_base
127	.byte	86
128	.byte	0                               # DW_AT_name
129	.byte	0                               # DW_AT_decl_file
130	.byte	1                               # DW_AT_decl_line
131	.long	41                              # DW_AT_type
132                                        # DW_AT_external
133	.byte	3                               # Abbrev [3] 0x29:0x4 DW_TAG_base_type
134	.byte	1                               # DW_AT_name
135	.byte	5                               # DW_AT_encoding
136	.byte	4                               # DW_AT_byte_size
137	.byte	0                               # End Of Children Mark
138.Ldebug_info_dwo_end0:
139	.section	.debug_abbrev.dwo,"e",@progbits
140	.byte	1                               # Abbreviation Code
141	.byte	17                              # DW_TAG_compile_unit
142	.byte	1                               # DW_CHILDREN_yes
143	.byte	37                              # DW_AT_producer
144	.byte	37                              # DW_FORM_strx1
145	.byte	19                              # DW_AT_language
146	.byte	5                               # DW_FORM_data2
147	.byte	3                               # DW_AT_name
148	.byte	37                              # DW_FORM_strx1
149	.byte	118                             # DW_AT_dwo_name
150	.byte	37                              # DW_FORM_strx1
151	.byte	0                               # EOM(1)
152	.byte	0                               # EOM(2)
153	.byte	2                               # Abbreviation Code
154	.byte	46                              # DW_TAG_subprogram
155	.byte	0                               # DW_CHILDREN_no
156	.byte	17                              # DW_AT_low_pc
157	.byte	27                              # DW_FORM_addrx
158	.byte	18                              # DW_AT_high_pc
159	.byte	6                               # DW_FORM_data4
160	.byte	64                              # DW_AT_frame_base
161	.byte	24                              # DW_FORM_exprloc
162	.byte	3                               # DW_AT_name
163	.byte	37                              # DW_FORM_strx1
164	.byte	58                              # DW_AT_decl_file
165	.byte	11                              # DW_FORM_data1
166	.byte	59                              # DW_AT_decl_line
167	.byte	11                              # DW_FORM_data1
168	.byte	73                              # DW_AT_type
169	.byte	19                              # DW_FORM_ref4
170	.byte	63                              # DW_AT_external
171	.byte	25                              # DW_FORM_flag_present
172	.byte	0                               # EOM(1)
173	.byte	0                               # EOM(2)
174	.byte	3                               # Abbreviation Code
175	.byte	36                              # DW_TAG_base_type
176	.byte	0                               # DW_CHILDREN_no
177	.byte	3                               # DW_AT_name
178	.byte	37                              # DW_FORM_strx1
179	.byte	62                              # DW_AT_encoding
180	.byte	11                              # DW_FORM_data1
181	.byte	11                              # DW_AT_byte_size
182	.byte	11                              # DW_FORM_data1
183	.byte	0                               # EOM(1)
184	.byte	0                               # EOM(2)
185	.byte	0                               # EOM(3)
186	.section	.debug_addr,"",@progbits
187	.long	.Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
188.Ldebug_addr_start0:
189	.short	5                               # DWARF version number
190	.byte	8                               # Address size
191	.byte	0                               # Segment selector size
192.Laddr_table_base0:
193	.quad	.Lfunc_begin0
194.Ldebug_addr_end0:
195	.section	.debug_gnu_pubnames,"",@progbits
196	.long	.LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
197.LpubNames_start0:
198	.short	2                               # DWARF Version
199	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
200	.long	40                              # Compilation Unit Length
201	.long	26                              # DIE offset
202	.byte	48                              # Attributes: FUNCTION, EXTERNAL
203	.asciz	"main"                          # External Name
204	.long	0                               # End Mark
205.LpubNames_end0:
206	.section	.debug_gnu_pubtypes,"",@progbits
207	.long	.LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
208.LpubTypes_start0:
209	.short	2                               # DWARF Version
210	.long	.Lcu_begin0                     # Offset of Compilation Unit Info
211	.long	40                              # Compilation Unit Length
212	.long	41                              # DIE offset
213	.byte	144                             # Attributes: TYPE, STATIC
214	.asciz	"int"                           # External Name
215	.long	0                               # End Mark
216.LpubTypes_end0:
217	.ident	"clang version 18.0.0"
218	.section	".note.GNU-stack","",@progbits
219	.addrsig
220	.section	.debug_line,"",@progbits
221.Lline_table_start0:
222