1 # int foo() { return 0; }
2 # int main() { return foo(); }
3 # clang++ -ffunction-sections -g2 -gdwarf-4 -gsplit-dwarf -S main.cpp
7 .globl _Z3foov # -- Begin function _Z3foov
9 .type _Z3foov,@function
12 .file 1 "." "main.cpp"
13 .loc 1 1 0 # main.cpp:1:0
17 .cfi_def_cfa_offset 16
20 .cfi_def_cfa_register %rbp
22 .loc 1 1 13 prologue_end # main.cpp:1:13
24 .loc 1 1 13 epilogue_begin is_stmt 0 # main.cpp:1:13
30 .size _Z3foov, .Lfunc_end0-_Z3foov
33 .globl main # -- Begin function main
38 .loc 1 2 0 is_stmt 1 # main.cpp:2:0
42 .cfi_def_cfa_offset 16
45 .cfi_def_cfa_register %rbp
49 .loc 1 2 21 prologue_end # main.cpp:2:21
51 .loc 1 2 14 epilogue_begin is_stmt 0 # main.cpp:2:14
58 .size main, .Lfunc_end1-main
61 .section .debug_abbrev,"",@progbits
62 .byte 1 # Abbreviation Code
63 .byte 17 # DW_TAG_compile_unit
64 .byte 0 # DW_CHILDREN_no
65 .byte 16 # DW_AT_stmt_list
66 .byte 23 # DW_FORM_sec_offset
67 .byte 27 # DW_AT_comp_dir
68 .byte 14 # DW_FORM_strp
69 .ascii "\264B" # DW_AT_GNU_pubnames
70 .byte 25 # DW_FORM_flag_present
71 .ascii "\260B" # DW_AT_GNU_dwo_name
72 .byte 14 # DW_FORM_strp
73 .ascii "\261B" # DW_AT_GNU_dwo_id
74 .byte 7 # DW_FORM_data8
75 .byte 17 # DW_AT_low_pc
76 .byte 1 # DW_FORM_addr
77 .byte 18 # DW_AT_high_pc
78 .byte 6 # DW_FORM_data4
79 .ascii "\263B" # DW_AT_GNU_addr_base
80 .byte 23 # DW_FORM_sec_offset
84 .section .debug_info,"",@progbits
86 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
88 .short 4 # DWARF version number
89 .long .debug_abbrev # Offset Into Abbrev. Section
90 .byte 8 # Address Size (in bytes)
91 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit
92 .long .Lline_table_start0 # DW_AT_stmt_list
93 .long .Lskel_string0 # DW_AT_comp_dir
95 .long .Lskel_string1 # DW_AT_GNU_dwo_name
96 .quad -252790171939032967 # DW_AT_GNU_dwo_id
97 .quad .Lfunc_begin0 # DW_AT_low_pc
98 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc
99 .long .Laddr_table_base0 # DW_AT_GNU_addr_base
101 .section .debug_str,"MS",@progbits,1
103 .asciz "." # string offset=0
105 .asciz "main.dwo" # string offset=59
106 .section .debug_str.dwo,"eMS",@progbits,1
108 .asciz "_Z3foov" # string offset=0
110 .asciz "foo" # string offset=8
112 .asciz "int" # string offset=12
114 .asciz "main" # string offset=16
116 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=21
118 .asciz "main.cpp" # string offset=126
120 .asciz "main.dwo" # string offset=135
121 .section .debug_str_offsets.dwo,"e",@progbits
129 .section .debug_info.dwo,"e",@progbits
130 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
131 .Ldebug_info_dwo_start0:
132 .short 4 # DWARF version number
133 .long 0 # Offset Into Abbrev. Section
134 .byte 8 # Address Size (in bytes)
135 .byte 1 # Abbrev [1] 0xb:0x32 DW_TAG_compile_unit
136 .byte 4 # DW_AT_producer
137 .short 33 # DW_AT_language
139 .byte 6 # DW_AT_GNU_dwo_name
140 .quad -252790171939032967 # DW_AT_GNU_dwo_id
141 .byte 2 # Abbrev [2] 0x19:0x10 DW_TAG_subprogram
142 .byte 0 # DW_AT_low_pc
143 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
144 .byte 1 # DW_AT_frame_base
146 .byte 0 # DW_AT_linkage_name
148 .byte 1 # DW_AT_decl_file
149 .byte 1 # DW_AT_decl_line
150 .long 56 # DW_AT_type
152 .byte 3 # Abbrev [3] 0x29:0xf DW_TAG_subprogram
153 .byte 1 # DW_AT_low_pc
154 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
155 .byte 1 # DW_AT_frame_base
158 .byte 1 # DW_AT_decl_file
159 .byte 2 # DW_AT_decl_line
160 .long 56 # DW_AT_type
162 .byte 4 # Abbrev [4] 0x38:0x4 DW_TAG_base_type
164 .byte 5 # DW_AT_encoding
165 .byte 4 # DW_AT_byte_size
166 .byte 0 # End Of Children Mark
167 .Ldebug_info_dwo_end0:
168 .section .debug_abbrev.dwo,"e",@progbits
169 .byte 1 # Abbreviation Code
170 .byte 17 # DW_TAG_compile_unit
171 .byte 1 # DW_CHILDREN_yes
172 .byte 37 # DW_AT_producer
173 .ascii "\202>" # DW_FORM_GNU_str_index
174 .byte 19 # DW_AT_language
175 .byte 5 # DW_FORM_data2
177 .ascii "\202>" # DW_FORM_GNU_str_index
178 .ascii "\260B" # DW_AT_GNU_dwo_name
179 .ascii "\202>" # DW_FORM_GNU_str_index
180 .ascii "\261B" # DW_AT_GNU_dwo_id
181 .byte 7 # DW_FORM_data8
184 .byte 2 # Abbreviation Code
185 .byte 46 # DW_TAG_subprogram
186 .byte 0 # DW_CHILDREN_no
187 .byte 17 # DW_AT_low_pc
188 .ascii "\201>" # DW_FORM_GNU_addr_index
189 .byte 18 # DW_AT_high_pc
190 .byte 6 # DW_FORM_data4
191 .byte 64 # DW_AT_frame_base
192 .byte 24 # DW_FORM_exprloc
193 .byte 110 # DW_AT_linkage_name
194 .ascii "\202>" # DW_FORM_GNU_str_index
196 .ascii "\202>" # DW_FORM_GNU_str_index
197 .byte 58 # DW_AT_decl_file
198 .byte 11 # DW_FORM_data1
199 .byte 59 # DW_AT_decl_line
200 .byte 11 # DW_FORM_data1
201 .byte 73 # DW_AT_type
202 .byte 19 # DW_FORM_ref4
203 .byte 63 # DW_AT_external
204 .byte 25 # DW_FORM_flag_present
207 .byte 3 # Abbreviation Code
208 .byte 46 # DW_TAG_subprogram
209 .byte 0 # DW_CHILDREN_no
210 .byte 17 # DW_AT_low_pc
211 .ascii "\201>" # DW_FORM_GNU_addr_index
212 .byte 18 # DW_AT_high_pc
213 .byte 6 # DW_FORM_data4
214 .byte 64 # DW_AT_frame_base
215 .byte 24 # DW_FORM_exprloc
217 .ascii "\202>" # DW_FORM_GNU_str_index
218 .byte 58 # DW_AT_decl_file
219 .byte 11 # DW_FORM_data1
220 .byte 59 # DW_AT_decl_line
221 .byte 11 # DW_FORM_data1
222 .byte 73 # DW_AT_type
223 .byte 19 # DW_FORM_ref4
224 .byte 63 # DW_AT_external
225 .byte 25 # DW_FORM_flag_present
228 .byte 4 # Abbreviation Code
229 .byte 36 # DW_TAG_base_type
230 .byte 0 # DW_CHILDREN_no
232 .ascii "\202>" # DW_FORM_GNU_str_index
233 .byte 62 # DW_AT_encoding
234 .byte 11 # DW_FORM_data1
235 .byte 11 # DW_AT_byte_size
236 .byte 11 # DW_FORM_data1
240 .section .debug_addr,"",@progbits
244 .section .debug_gnu_pubnames,"",@progbits
245 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info
247 .short 2 # DWARF Version
248 .long .Lcu_begin0 # Offset of Compilation Unit Info
249 .long 48 # Compilation Unit Length
250 .long 41 # DIE offset
251 .byte 48 # Attributes: FUNCTION, EXTERNAL
252 .asciz "main" # External Name
253 .long 25 # DIE offset
254 .byte 48 # Attributes: FUNCTION, EXTERNAL
255 .asciz "foo" # External Name
258 .section .debug_gnu_pubtypes,"",@progbits
259 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info
261 .short 2 # DWARF Version
262 .long .Lcu_begin0 # Offset of Compilation Unit Info
263 .long 48 # Compilation Unit Length
264 .long 56 # DIE offset
265 .byte 144 # Attributes: TYPE, STATIC
266 .asciz "int" # External Name
269 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"
270 .section ".note.GNU-stack","",@progbits
273 .section .debug_line,"",@progbits