1 # int foo() { return 0; }
2 # int main() { return foo(); }
3 # clang++ -ffunction-sections -g2 -gdwarf-4 -gsplit-dwarf -S main.cpp
7 .section .text._Z3foov,"ax",@progbits
8 .globl _Z3foov # -- Begin function _Z3foov
10 .type _Z3foov,@function
13 .file 1 "." "main.cpp"
14 .loc 1 1 0 # main.cpp:1:0
18 .cfi_def_cfa_offset 16
21 .cfi_def_cfa_register %rbp
23 .loc 1 1 13 prologue_end # main.cpp:1:13
25 .loc 1 1 13 epilogue_begin is_stmt 0 # main.cpp:1:13
31 .size _Z3foov, .Lfunc_end0-_Z3foov
34 .section .text.main,"ax",@progbits
35 .globl main # -- Begin function main
40 .loc 1 2 0 is_stmt 1 # main.cpp:2:0
44 .cfi_def_cfa_offset 16
47 .cfi_def_cfa_register %rbp
51 .loc 1 2 21 prologue_end # main.cpp:2:21
53 .loc 1 2 14 epilogue_begin is_stmt 0 # main.cpp:2:14
60 .size main, .Lfunc_end1-main
63 .section .debug_abbrev,"",@progbits
64 .byte 1 # Abbreviation Code
65 .byte 17 # DW_TAG_compile_unit
66 .byte 0 # DW_CHILDREN_no
67 .byte 16 # DW_AT_stmt_list
68 .byte 23 # DW_FORM_sec_offset
69 .byte 27 # DW_AT_comp_dir
70 .byte 14 # DW_FORM_strp
71 .ascii "\264B" # DW_AT_GNU_pubnames
72 .byte 25 # DW_FORM_flag_present
73 .ascii "\260B" # DW_AT_GNU_dwo_name
74 .byte 14 # DW_FORM_strp
75 .ascii "\261B" # DW_AT_GNU_dwo_id
76 .byte 7 # DW_FORM_data8
77 .byte 17 # DW_AT_low_pc
78 .byte 1 # DW_FORM_addr
79 .byte 85 # DW_AT_ranges
80 .byte 23 # DW_FORM_sec_offset
81 .ascii "\263B" # DW_AT_GNU_addr_base
82 .byte 23 # DW_FORM_sec_offset
86 .section .debug_info,"",@progbits
88 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
90 .short 4 # DWARF version number
91 .long .debug_abbrev # Offset Into Abbrev. Section
92 .byte 8 # Address Size (in bytes)
93 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
94 .long .Lline_table_start0 # DW_AT_stmt_list
95 .long .Lskel_string0 # DW_AT_comp_dir
97 .long .Lskel_string1 # DW_AT_GNU_dwo_name
98 .quad -252790171939032967 # DW_AT_GNU_dwo_id
99 .quad 0 # DW_AT_low_pc
100 .long .Ldebug_ranges0 # DW_AT_ranges
101 .long .Laddr_table_base0 # DW_AT_GNU_addr_base
103 .section .debug_ranges,"",@progbits
111 .section .debug_str,"MS",@progbits,1
113 .asciz "." # string offset=0
115 .asciz "main.dwo" # string offset=58
116 .section .debug_str.dwo,"eMS",@progbits,1
118 .asciz "_Z3foov" # string offset=0
120 .asciz "foo" # string offset=8
122 .asciz "int" # string offset=12
124 .asciz "main" # string offset=16
126 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=21
128 .asciz "main.cpp" # string offset=126
130 .asciz "main.dwo" # string offset=135
131 .section .debug_str_offsets.dwo,"e",@progbits
139 .section .debug_info.dwo,"e",@progbits
140 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
141 .Ldebug_info_dwo_start0:
142 .short 4 # DWARF version number
143 .long 0 # Offset Into Abbrev. Section
144 .byte 8 # Address Size (in bytes)
145 .byte 1 # Abbrev [1] 0xb:0x32 DW_TAG_compile_unit
146 .byte 4 # DW_AT_producer
147 .short 33 # DW_AT_language
149 .byte 6 # DW_AT_GNU_dwo_name
150 .quad -252790171939032967 # DW_AT_GNU_dwo_id
151 .byte 2 # Abbrev [2] 0x19:0x10 DW_TAG_subprogram
152 .byte 0 # DW_AT_low_pc
153 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
154 .byte 1 # DW_AT_frame_base
156 .byte 0 # DW_AT_linkage_name
158 .byte 1 # DW_AT_decl_file
159 .byte 1 # DW_AT_decl_line
160 .long 56 # DW_AT_type
162 .byte 3 # Abbrev [3] 0x29:0xf DW_TAG_subprogram
163 .byte 1 # DW_AT_low_pc
164 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
165 .byte 1 # DW_AT_frame_base
168 .byte 1 # DW_AT_decl_file
169 .byte 2 # DW_AT_decl_line
170 .long 56 # DW_AT_type
172 .byte 4 # Abbrev [4] 0x38:0x4 DW_TAG_base_type
174 .byte 5 # DW_AT_encoding
175 .byte 4 # DW_AT_byte_size
176 .byte 0 # End Of Children Mark
177 .Ldebug_info_dwo_end0:
178 .section .debug_abbrev.dwo,"e",@progbits
179 .byte 1 # Abbreviation Code
180 .byte 17 # DW_TAG_compile_unit
181 .byte 1 # DW_CHILDREN_yes
182 .byte 37 # DW_AT_producer
183 .ascii "\202>" # DW_FORM_GNU_str_index
184 .byte 19 # DW_AT_language
185 .byte 5 # DW_FORM_data2
187 .ascii "\202>" # DW_FORM_GNU_str_index
188 .ascii "\260B" # DW_AT_GNU_dwo_name
189 .ascii "\202>" # DW_FORM_GNU_str_index
190 .ascii "\261B" # DW_AT_GNU_dwo_id
191 .byte 7 # DW_FORM_data8
194 .byte 2 # Abbreviation Code
195 .byte 46 # DW_TAG_subprogram
196 .byte 0 # DW_CHILDREN_no
197 .byte 17 # DW_AT_low_pc
198 .ascii "\201>" # DW_FORM_GNU_addr_index
199 .byte 18 # DW_AT_high_pc
200 .byte 6 # DW_FORM_data4
201 .byte 64 # DW_AT_frame_base
202 .byte 24 # DW_FORM_exprloc
203 .byte 110 # DW_AT_linkage_name
204 .ascii "\202>" # DW_FORM_GNU_str_index
206 .ascii "\202>" # DW_FORM_GNU_str_index
207 .byte 58 # DW_AT_decl_file
208 .byte 11 # DW_FORM_data1
209 .byte 59 # DW_AT_decl_line
210 .byte 11 # DW_FORM_data1
211 .byte 73 # DW_AT_type
212 .byte 19 # DW_FORM_ref4
213 .byte 63 # DW_AT_external
214 .byte 25 # DW_FORM_flag_present
217 .byte 3 # Abbreviation Code
218 .byte 46 # DW_TAG_subprogram
219 .byte 0 # DW_CHILDREN_no
220 .byte 17 # DW_AT_low_pc
221 .ascii "\201>" # DW_FORM_GNU_addr_index
222 .byte 18 # DW_AT_high_pc
223 .byte 6 # DW_FORM_data4
224 .byte 64 # DW_AT_frame_base
225 .byte 24 # DW_FORM_exprloc
227 .ascii "\202>" # DW_FORM_GNU_str_index
228 .byte 58 # DW_AT_decl_file
229 .byte 11 # DW_FORM_data1
230 .byte 59 # DW_AT_decl_line
231 .byte 11 # DW_FORM_data1
232 .byte 73 # DW_AT_type
233 .byte 19 # DW_FORM_ref4
234 .byte 63 # DW_AT_external
235 .byte 25 # DW_FORM_flag_present
238 .byte 4 # Abbreviation Code
239 .byte 36 # DW_TAG_base_type
240 .byte 0 # DW_CHILDREN_no
242 .ascii "\202>" # DW_FORM_GNU_str_index
243 .byte 62 # DW_AT_encoding
244 .byte 11 # DW_FORM_data1
245 .byte 11 # DW_AT_byte_size
246 .byte 11 # DW_FORM_data1
250 .section .debug_addr,"",@progbits
254 .section .debug_gnu_pubnames,"",@progbits
255 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
257 .short 2 # DWARF Version
258 .long .Lcu_begin0 # Offset of Compilation Unit Info
259 .long 48 # Compilation Unit Length
260 .long 41 # DIE offset
261 .byte 48 # Attributes: FUNCTION, EXTERNAL
262 .asciz "main" # External Name
263 .long 25 # DIE offset
264 .byte 48 # Attributes: FUNCTION, EXTERNAL
265 .asciz "foo" # External Name
268 .section .debug_gnu_pubtypes,"",@progbits
269 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
271 .short 2 # DWARF Version
272 .long .Lcu_begin0 # Offset of Compilation Unit Info
273 .long 48 # Compilation Unit Length
274 .long 56 # DIE offset
275 .byte 144 # Attributes: TYPE, STATIC
276 .asciz "int" # External Name
279 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"
280 .section ".note.GNU-stack","",@progbits
283 .section .debug_line,"",@progbits