275 lines · plain
1# int foo() { return 0; }2# int main() { return foo(); }3# clang++ -ffunction-sections -g2 -gdwarf-4 -gsplit-dwarf -S main.cpp4 5.text6 .file "main.cpp"7 .globl _Z3foov # -- Begin function _Z3foov8 .p2align 4, 0x909 .type _Z3foov,@function10_Z3foov: # @_Z3foov11.Lfunc_begin0:12 .file 1 "." "main.cpp"13 .loc 1 1 0 # main.cpp:1:014 .cfi_startproc15# %bb.0: # %entry16 pushq %rbp17 .cfi_def_cfa_offset 1618 .cfi_offset %rbp, -1619 movq %rsp, %rbp20 .cfi_def_cfa_register %rbp21.Ltmp0:22 .loc 1 1 13 prologue_end # main.cpp:1:1323 xorl %eax, %eax24 .loc 1 1 13 epilogue_begin is_stmt 0 # main.cpp:1:1325 popq %rbp26 .cfi_def_cfa %rsp, 827 retq28.Ltmp1:29.Lfunc_end0:30 .size _Z3foov, .Lfunc_end0-_Z3foov31 .cfi_endproc32 # -- End function33 .globl main # -- Begin function main34 .p2align 4, 0x9035 .type main,@function36main: # @main37.Lfunc_begin1:38 .loc 1 2 0 is_stmt 1 # main.cpp:2:039 .cfi_startproc40# %bb.0: # %entry41 pushq %rbp42 .cfi_def_cfa_offset 1643 .cfi_offset %rbp, -1644 movq %rsp, %rbp45 .cfi_def_cfa_register %rbp46 subq $16, %rsp47 movl $0, -4(%rbp)48.Ltmp2:49 .loc 1 2 21 prologue_end # main.cpp:2:2150 callq _Z3foov51 .loc 1 2 14 epilogue_begin is_stmt 0 # main.cpp:2:1452 addq $16, %rsp53 popq %rbp54 .cfi_def_cfa %rsp, 855 retq56.Ltmp3:57.Lfunc_end1:58 .size main, .Lfunc_end1-main59 .cfi_endproc60 # -- End function61 .section .debug_abbrev,"",@progbits62 .byte 1 # Abbreviation Code63 .byte 17 # DW_TAG_compile_unit64 .byte 0 # DW_CHILDREN_no65 .byte 16 # DW_AT_stmt_list66 .byte 23 # DW_FORM_sec_offset67 .byte 27 # DW_AT_comp_dir68 .byte 14 # DW_FORM_strp69 .ascii "\264B" # DW_AT_GNU_pubnames70 .byte 25 # DW_FORM_flag_present71 .ascii "\260B" # DW_AT_GNU_dwo_name72 .byte 14 # DW_FORM_strp73 .ascii "\261B" # DW_AT_GNU_dwo_id74 .byte 7 # DW_FORM_data875 .byte 17 # DW_AT_low_pc76 .byte 1 # DW_FORM_addr77 .byte 18 # DW_AT_high_pc78 .byte 6 # DW_FORM_data479 .ascii "\263B" # DW_AT_GNU_addr_base80 .byte 23 # DW_FORM_sec_offset81 .byte 0 # EOM(1)82 .byte 0 # EOM(2)83 .byte 0 # EOM(3)84 .section .debug_info,"",@progbits85.Lcu_begin0:86 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit87.Ldebug_info_start0:88 .short 4 # DWARF version number89 .long .debug_abbrev # Offset Into Abbrev. Section90 .byte 8 # Address Size (in bytes)91 .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit92 .long .Lline_table_start0 # DW_AT_stmt_list93 .long .Lskel_string0 # DW_AT_comp_dir94 # DW_AT_GNU_pubnames95 .long .Lskel_string1 # DW_AT_GNU_dwo_name96 .quad -252790171939032967 # DW_AT_GNU_dwo_id97 .quad .Lfunc_begin0 # DW_AT_low_pc98 .long .Lfunc_end1-.Lfunc_begin0 # DW_AT_high_pc99 .long .Laddr_table_base0 # DW_AT_GNU_addr_base100.Ldebug_info_end0:101 .section .debug_str,"MS",@progbits,1102.Lskel_string0:103 .asciz "." # string offset=0104.Lskel_string1:105 .asciz "main.dwo" # string offset=59106 .section .debug_str.dwo,"eMS",@progbits,1107.Linfo_string0:108 .asciz "_Z3foov" # string offset=0109.Linfo_string1:110 .asciz "foo" # string offset=8111.Linfo_string2:112 .asciz "int" # string offset=12113.Linfo_string3:114 .asciz "main" # string offset=16115.Linfo_string4:116 .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=21117.Linfo_string5:118 .asciz "main.cpp" # string offset=126119.Linfo_string6:120 .asciz "main.dwo" # string offset=135121 .section .debug_str_offsets.dwo,"e",@progbits122 .long 0123 .long 8124 .long 12125 .long 16126 .long 21127 .long 126128 .long 135129 .section .debug_info.dwo,"e",@progbits130 .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit131.Ldebug_info_dwo_start0:132 .short 4 # DWARF version number133 .long 0 # Offset Into Abbrev. Section134 .byte 8 # Address Size (in bytes)135 .byte 1 # Abbrev [1] 0xb:0x32 DW_TAG_compile_unit136 .byte 4 # DW_AT_producer137 .short 33 # DW_AT_language138 .byte 5 # DW_AT_name139 .byte 6 # DW_AT_GNU_dwo_name140 .quad -252790171939032967 # DW_AT_GNU_dwo_id141 .byte 2 # Abbrev [2] 0x19:0x10 DW_TAG_subprogram142 .byte 0 # DW_AT_low_pc143 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc144 .byte 1 # DW_AT_frame_base145 .byte 86146 .byte 0 # DW_AT_linkage_name147 .byte 1 # DW_AT_name148 .byte 1 # DW_AT_decl_file149 .byte 1 # DW_AT_decl_line150 .long 56 # DW_AT_type151 # DW_AT_external152 .byte 3 # Abbrev [3] 0x29:0xf DW_TAG_subprogram153 .byte 1 # DW_AT_low_pc154 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc155 .byte 1 # DW_AT_frame_base156 .byte 86157 .byte 3 # DW_AT_name158 .byte 1 # DW_AT_decl_file159 .byte 2 # DW_AT_decl_line160 .long 56 # DW_AT_type161 # DW_AT_external162 .byte 4 # Abbrev [4] 0x38:0x4 DW_TAG_base_type163 .byte 2 # DW_AT_name164 .byte 5 # DW_AT_encoding165 .byte 4 # DW_AT_byte_size166 .byte 0 # End Of Children Mark167.Ldebug_info_dwo_end0:168 .section .debug_abbrev.dwo,"e",@progbits169 .byte 1 # Abbreviation Code170 .byte 17 # DW_TAG_compile_unit171 .byte 1 # DW_CHILDREN_yes172 .byte 37 # DW_AT_producer173 .ascii "\202>" # DW_FORM_GNU_str_index174 .byte 19 # DW_AT_language175 .byte 5 # DW_FORM_data2176 .byte 3 # DW_AT_name177 .ascii "\202>" # DW_FORM_GNU_str_index178 .ascii "\260B" # DW_AT_GNU_dwo_name179 .ascii "\202>" # DW_FORM_GNU_str_index180 .ascii "\261B" # DW_AT_GNU_dwo_id181 .byte 7 # DW_FORM_data8182 .byte 0 # EOM(1)183 .byte 0 # EOM(2)184 .byte 2 # Abbreviation Code185 .byte 46 # DW_TAG_subprogram186 .byte 0 # DW_CHILDREN_no187 .byte 17 # DW_AT_low_pc188 .ascii "\201>" # DW_FORM_GNU_addr_index189 .byte 18 # DW_AT_high_pc190 .byte 6 # DW_FORM_data4191 .byte 64 # DW_AT_frame_base192 .byte 24 # DW_FORM_exprloc193 .byte 110 # DW_AT_linkage_name194 .ascii "\202>" # DW_FORM_GNU_str_index195 .byte 3 # DW_AT_name196 .ascii "\202>" # DW_FORM_GNU_str_index197 .byte 58 # DW_AT_decl_file198 .byte 11 # DW_FORM_data1199 .byte 59 # DW_AT_decl_line200 .byte 11 # DW_FORM_data1201 .byte 73 # DW_AT_type202 .byte 19 # DW_FORM_ref4203 .byte 63 # DW_AT_external204 .byte 25 # DW_FORM_flag_present205 .byte 0 # EOM(1)206 .byte 0 # EOM(2)207 .byte 3 # Abbreviation Code208 .byte 46 # DW_TAG_subprogram209 .byte 0 # DW_CHILDREN_no210 .byte 17 # DW_AT_low_pc211 .ascii "\201>" # DW_FORM_GNU_addr_index212 .byte 18 # DW_AT_high_pc213 .byte 6 # DW_FORM_data4214 .byte 64 # DW_AT_frame_base215 .byte 24 # DW_FORM_exprloc216 .byte 3 # DW_AT_name217 .ascii "\202>" # DW_FORM_GNU_str_index218 .byte 58 # DW_AT_decl_file219 .byte 11 # DW_FORM_data1220 .byte 59 # DW_AT_decl_line221 .byte 11 # DW_FORM_data1222 .byte 73 # DW_AT_type223 .byte 19 # DW_FORM_ref4224 .byte 63 # DW_AT_external225 .byte 25 # DW_FORM_flag_present226 .byte 0 # EOM(1)227 .byte 0 # EOM(2)228 .byte 4 # Abbreviation Code229 .byte 36 # DW_TAG_base_type230 .byte 0 # DW_CHILDREN_no231 .byte 3 # DW_AT_name232 .ascii "\202>" # DW_FORM_GNU_str_index233 .byte 62 # DW_AT_encoding234 .byte 11 # DW_FORM_data1235 .byte 11 # DW_AT_byte_size236 .byte 11 # DW_FORM_data1237 .byte 0 # EOM(1)238 .byte 0 # EOM(2)239 .byte 0 # EOM(3)240 .section .debug_addr,"",@progbits241.Laddr_table_base0:242 .quad .Lfunc_begin0243 .quad .Lfunc_begin1244 .section .debug_gnu_pubnames,"",@progbits245 .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info246.LpubNames_start0:247 .short 2 # DWARF Version248 .long .Lcu_begin0 # Offset of Compilation Unit Info249 .long 48 # Compilation Unit Length250 .long 41 # DIE offset251 .byte 48 # Attributes: FUNCTION, EXTERNAL252 .asciz "main" # External Name253 .long 25 # DIE offset254 .byte 48 # Attributes: FUNCTION, EXTERNAL255 .asciz "foo" # External Name256 .long 0 # End Mark257.LpubNames_end0:258 .section .debug_gnu_pubtypes,"",@progbits259 .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info260.LpubTypes_start0:261 .short 2 # DWARF Version262 .long .Lcu_begin0 # Offset of Compilation Unit Info263 .long 48 # Compilation Unit Length264 .long 56 # DIE offset265 .byte 144 # Attributes: TYPE, STATIC266 .asciz "int" # External Name267 .long 0 # End Mark268.LpubTypes_end0:269 .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)"270 .section ".note.GNU-stack","",@progbits271 .addrsig272 .addrsig_sym _Z3foov273 .section .debug_line,"",@progbits274.Lline_table_start0:275