xref: /llvm-project/bolt/test/X86/Inputs/dwarf4-debug-line-offset-change-after-bolt-helper.s (revision bb6a4850553dd4140a5bd63187ec1b14d0b731f9)
1# clang++ -g2 -fdebug-types-section -gdwarf-4 -ffunction-sections
2# int foo(int i) {
3#   if (i == 1)
4#     return 2;
5#   return 1;
6# }
7# int main(int argc, char* argv[]) {
8#   int j = argc;
9#   if (j ==3)
10#     j+= foo(argc);
11#   return j;
12# }
13	.text
14	.file	"helper.cpp"
15	.file	1 "/test" "helper.cpp"
16	.section	.debug_types,"G",@progbits,7448148824980338162,comdat
17.Ltu_begin0:
18	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
19.Ldebug_info_start0:
20	.short	4                               # DWARF version number
21	.long	.debug_abbrev                   # Offset Into Abbrev. Section
22	.byte	8                               # Address Size (in bytes)
23	.quad	7448148824980338162             # Type Signature
24	.long	30                              # Type DIE Offset
25	.byte	1                               # Abbrev [1] 0x17:0x25 DW_TAG_type_unit
26	.short	33                              # DW_AT_language
27	.long	.Lline_table_start0             # DW_AT_stmt_list
28	.byte	2                               # Abbrev [2] 0x1e:0x16 DW_TAG_structure_type
29	.byte	5                               # DW_AT_calling_convention
30	.long	.Linfo_string6                  # DW_AT_name
31	.byte	4                               # DW_AT_byte_size
32	.byte	1                               # DW_AT_decl_file
33	.byte	1                               # DW_AT_decl_line
34	.byte	3                               # Abbrev [3] 0x27:0xc DW_TAG_member
35	.long	.Linfo_string4                  # DW_AT_name
36	.long	52                              # DW_AT_type
37	.byte	1                               # DW_AT_decl_file
38	.byte	2                               # DW_AT_decl_line
39	.byte	0                               # DW_AT_data_member_location
40	.byte	0                               # End Of Children Mark
41	.byte	4                               # Abbrev [4] 0x34:0x7 DW_TAG_base_type
42	.long	.Linfo_string5                  # DW_AT_name
43	.byte	5                               # DW_AT_encoding
44	.byte	4                               # DW_AT_byte_size
45	.byte	0                               # End Of Children Mark
46.Ldebug_info_end0:
47	.type	f2,@object                      # @f2
48	.bss
49	.globl	f2
50	.p2align	2, 0x0
51f2:
52	.zero	4
53	.size	f2, 4
54
55	.section	.debug_abbrev,"",@progbits
56	.byte	1                               # Abbreviation Code
57	.byte	65                              # DW_TAG_type_unit
58	.byte	1                               # DW_CHILDREN_yes
59	.byte	19                              # DW_AT_language
60	.byte	5                               # DW_FORM_data2
61	.byte	16                              # DW_AT_stmt_list
62	.byte	23                              # DW_FORM_sec_offset
63	.byte	0                               # EOM(1)
64	.byte	0                               # EOM(2)
65	.byte	2                               # Abbreviation Code
66	.byte	19                              # DW_TAG_structure_type
67	.byte	1                               # DW_CHILDREN_yes
68	.byte	54                              # DW_AT_calling_convention
69	.byte	11                              # DW_FORM_data1
70	.byte	3                               # DW_AT_name
71	.byte	14                              # DW_FORM_strp
72	.byte	11                              # DW_AT_byte_size
73	.byte	11                              # DW_FORM_data1
74	.byte	58                              # DW_AT_decl_file
75	.byte	11                              # DW_FORM_data1
76	.byte	59                              # DW_AT_decl_line
77	.byte	11                              # DW_FORM_data1
78	.byte	0                               # EOM(1)
79	.byte	0                               # EOM(2)
80	.byte	3                               # Abbreviation Code
81	.byte	13                              # DW_TAG_member
82	.byte	0                               # DW_CHILDREN_no
83	.byte	3                               # DW_AT_name
84	.byte	14                              # DW_FORM_strp
85	.byte	73                              # DW_AT_type
86	.byte	19                              # DW_FORM_ref4
87	.byte	58                              # DW_AT_decl_file
88	.byte	11                              # DW_FORM_data1
89	.byte	59                              # DW_AT_decl_line
90	.byte	11                              # DW_FORM_data1
91	.byte	56                              # DW_AT_data_member_location
92	.byte	11                              # DW_FORM_data1
93	.byte	0                               # EOM(1)
94	.byte	0                               # EOM(2)
95	.byte	4                               # Abbreviation Code
96	.byte	36                              # DW_TAG_base_type
97	.byte	0                               # DW_CHILDREN_no
98	.byte	3                               # DW_AT_name
99	.byte	14                              # DW_FORM_strp
100	.byte	62                              # DW_AT_encoding
101	.byte	11                              # DW_FORM_data1
102	.byte	11                              # DW_AT_byte_size
103	.byte	11                              # DW_FORM_data1
104	.byte	0                               # EOM(1)
105	.byte	0                               # EOM(2)
106	.byte	5                               # Abbreviation Code
107	.byte	17                              # DW_TAG_compile_unit
108	.byte	1                               # DW_CHILDREN_yes
109	.byte	37                              # DW_AT_producer
110	.byte	14                              # DW_FORM_strp
111	.byte	19                              # DW_AT_language
112	.byte	5                               # DW_FORM_data2
113	.byte	3                               # DW_AT_name
114	.byte	14                              # DW_FORM_strp
115	.byte	16                              # DW_AT_stmt_list
116	.byte	23                              # DW_FORM_sec_offset
117	.byte	27                              # DW_AT_comp_dir
118	.byte	14                              # DW_FORM_strp
119	.byte	0                               # EOM(1)
120	.byte	0                               # EOM(2)
121	.byte	6                               # Abbreviation Code
122	.byte	52                              # DW_TAG_variable
123	.byte	0                               # DW_CHILDREN_no
124	.byte	3                               # DW_AT_name
125	.byte	14                              # DW_FORM_strp
126	.byte	73                              # DW_AT_type
127	.byte	19                              # DW_FORM_ref4
128	.byte	63                              # DW_AT_external
129	.byte	25                              # DW_FORM_flag_present
130	.byte	58                              # DW_AT_decl_file
131	.byte	11                              # DW_FORM_data1
132	.byte	59                              # DW_AT_decl_line
133	.byte	11                              # DW_FORM_data1
134	.byte	2                               # DW_AT_location
135	.byte	24                              # DW_FORM_exprloc
136	.byte	0                               # EOM(1)
137	.byte	0                               # EOM(2)
138	.byte	7                               # Abbreviation Code
139	.byte	19                              # DW_TAG_structure_type
140	.byte	0                               # DW_CHILDREN_no
141	.byte	60                              # DW_AT_declaration
142	.byte	25                              # DW_FORM_flag_present
143	.byte	105                             # DW_AT_signature
144	.byte	32                              # DW_FORM_ref_sig8
145	.byte	0                               # EOM(1)
146	.byte	0                               # EOM(2)
147	.byte	0                               # EOM(3)
148	.section	.debug_info,"",@progbits
149.Lcu_begin0:
150	.long	.Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
151.Ldebug_info_start1:
152	.short	4                               # DWARF version number
153	.long	.debug_abbrev                   # Offset Into Abbrev. Section
154	.byte	8                               # Address Size (in bytes)
155	.byte	5                               # Abbrev [5] 0xb:0x32 DW_TAG_compile_unit
156	.long	.Linfo_string0                  # DW_AT_producer
157	.short	33                              # DW_AT_language
158	.long	.Linfo_string1                  # DW_AT_name
159	.long	.Lline_table_start0             # DW_AT_stmt_list
160	.long	.Linfo_string2                  # DW_AT_comp_dir
161	.byte	6                               # Abbrev [6] 0x1e:0x15 DW_TAG_variable
162	.long	.Linfo_string3                  # DW_AT_name
163	.long	51                              # DW_AT_type
164                                        # DW_AT_external
165	.byte	1                               # DW_AT_decl_file
166	.byte	4                               # DW_AT_decl_line
167	.byte	9                               # DW_AT_location
168	.byte	3
169	.quad	f2
170	.byte	7                               # Abbrev [7] 0x33:0x9 DW_TAG_structure_type
171                                        # DW_AT_declaration
172	.quad	7448148824980338162             # DW_AT_signature
173	.byte	0                               # End Of Children Mark
174.Ldebug_info_end1:
175	.section	.debug_str,"MS",@progbits,1
176.Linfo_string0:
177	.asciz	"clang version 18.0.0git"       # string offset=0
178.Linfo_string1:
179	.asciz	"helper.cpp"                    # string offset=24
180.Linfo_string2:
181	.asciz	"/test" # string offset=35
182.Linfo_string3:
183	.asciz	"f2"                            # string offset=73
184.Linfo_string4:
185	.asciz	"i"                             # string offset=76
186.Linfo_string5:
187	.asciz	"int"                           # string offset=78
188.Linfo_string6:
189	.asciz	"Foo"                           # string offset=82
190	.ident	"clang version 18.0.0git"
191	.section	".note.GNU-stack","",@progbits
192	.addrsig
193	.section	.debug_line,"",@progbits
194.Lline_table_start0:
195