1*790b75eaSAlexander Yermolovich# int foo() { return 0; } 2*790b75eaSAlexander Yermolovich# int main() { return foo(); } 3*790b75eaSAlexander Yermolovich# clang++ -ffunction-sections -g2 -gdwarf-4 -gsplit-dwarf -S main.cpp 4*790b75eaSAlexander Yermolovich 5*790b75eaSAlexander Yermolovich .text 6*790b75eaSAlexander Yermolovich .file "main.cpp" 7*790b75eaSAlexander Yermolovich .section .text._Z3foov,"ax",@progbits 8*790b75eaSAlexander Yermolovich .globl _Z3foov # -- Begin function _Z3foov 9*790b75eaSAlexander Yermolovich .p2align 4, 0x90 10*790b75eaSAlexander Yermolovich .type _Z3foov,@function 11*790b75eaSAlexander Yermolovich_Z3foov: # @_Z3foov 12*790b75eaSAlexander Yermolovich.Lfunc_begin0: 13*790b75eaSAlexander Yermolovich .file 1 "." "main.cpp" 14*790b75eaSAlexander Yermolovich .loc 1 1 0 # main.cpp:1:0 15*790b75eaSAlexander Yermolovich .cfi_startproc 16*790b75eaSAlexander Yermolovich# %bb.0: # %entry 17*790b75eaSAlexander Yermolovich pushq %rbp 18*790b75eaSAlexander Yermolovich .cfi_def_cfa_offset 16 19*790b75eaSAlexander Yermolovich .cfi_offset %rbp, -16 20*790b75eaSAlexander Yermolovich movq %rsp, %rbp 21*790b75eaSAlexander Yermolovich .cfi_def_cfa_register %rbp 22*790b75eaSAlexander Yermolovich.Ltmp0: 23*790b75eaSAlexander Yermolovich .loc 1 1 13 prologue_end # main.cpp:1:13 24*790b75eaSAlexander Yermolovich xorl %eax, %eax 25*790b75eaSAlexander Yermolovich .loc 1 1 13 epilogue_begin is_stmt 0 # main.cpp:1:13 26*790b75eaSAlexander Yermolovich popq %rbp 27*790b75eaSAlexander Yermolovich .cfi_def_cfa %rsp, 8 28*790b75eaSAlexander Yermolovich retq 29*790b75eaSAlexander Yermolovich.Ltmp1: 30*790b75eaSAlexander Yermolovich.Lfunc_end0: 31*790b75eaSAlexander Yermolovich .size _Z3foov, .Lfunc_end0-_Z3foov 32*790b75eaSAlexander Yermolovich .cfi_endproc 33*790b75eaSAlexander Yermolovich # -- End function 34*790b75eaSAlexander Yermolovich .section .text.main,"ax",@progbits 35*790b75eaSAlexander Yermolovich .globl main # -- Begin function main 36*790b75eaSAlexander Yermolovich .p2align 4, 0x90 37*790b75eaSAlexander Yermolovich .type main,@function 38*790b75eaSAlexander Yermolovichmain: # @main 39*790b75eaSAlexander Yermolovich.Lfunc_begin1: 40*790b75eaSAlexander Yermolovich .loc 1 2 0 is_stmt 1 # main.cpp:2:0 41*790b75eaSAlexander Yermolovich .cfi_startproc 42*790b75eaSAlexander Yermolovich# %bb.0: # %entry 43*790b75eaSAlexander Yermolovich pushq %rbp 44*790b75eaSAlexander Yermolovich .cfi_def_cfa_offset 16 45*790b75eaSAlexander Yermolovich .cfi_offset %rbp, -16 46*790b75eaSAlexander Yermolovich movq %rsp, %rbp 47*790b75eaSAlexander Yermolovich .cfi_def_cfa_register %rbp 48*790b75eaSAlexander Yermolovich subq $16, %rsp 49*790b75eaSAlexander Yermolovich movl $0, -4(%rbp) 50*790b75eaSAlexander Yermolovich.Ltmp2: 51*790b75eaSAlexander Yermolovich .loc 1 2 21 prologue_end # main.cpp:2:21 52*790b75eaSAlexander Yermolovich callq _Z3foov 53*790b75eaSAlexander Yermolovich .loc 1 2 14 epilogue_begin is_stmt 0 # main.cpp:2:14 54*790b75eaSAlexander Yermolovich addq $16, %rsp 55*790b75eaSAlexander Yermolovich popq %rbp 56*790b75eaSAlexander Yermolovich .cfi_def_cfa %rsp, 8 57*790b75eaSAlexander Yermolovich retq 58*790b75eaSAlexander Yermolovich.Ltmp3: 59*790b75eaSAlexander Yermolovich.Lfunc_end1: 60*790b75eaSAlexander Yermolovich .size main, .Lfunc_end1-main 61*790b75eaSAlexander Yermolovich .cfi_endproc 62*790b75eaSAlexander Yermolovich # -- End function 63*790b75eaSAlexander Yermolovich .section .debug_abbrev,"",@progbits 64*790b75eaSAlexander Yermolovich .byte 1 # Abbreviation Code 65*790b75eaSAlexander Yermolovich .byte 17 # DW_TAG_compile_unit 66*790b75eaSAlexander Yermolovich .byte 0 # DW_CHILDREN_no 67*790b75eaSAlexander Yermolovich .byte 16 # DW_AT_stmt_list 68*790b75eaSAlexander Yermolovich .byte 23 # DW_FORM_sec_offset 69*790b75eaSAlexander Yermolovich .byte 27 # DW_AT_comp_dir 70*790b75eaSAlexander Yermolovich .byte 14 # DW_FORM_strp 71*790b75eaSAlexander Yermolovich .ascii "\264B" # DW_AT_GNU_pubnames 72*790b75eaSAlexander Yermolovich .byte 25 # DW_FORM_flag_present 73*790b75eaSAlexander Yermolovich .ascii "\260B" # DW_AT_GNU_dwo_name 74*790b75eaSAlexander Yermolovich .byte 14 # DW_FORM_strp 75*790b75eaSAlexander Yermolovich .ascii "\261B" # DW_AT_GNU_dwo_id 76*790b75eaSAlexander Yermolovich .byte 7 # DW_FORM_data8 77*790b75eaSAlexander Yermolovich .byte 17 # DW_AT_low_pc 78*790b75eaSAlexander Yermolovich .byte 1 # DW_FORM_addr 79*790b75eaSAlexander Yermolovich .byte 85 # DW_AT_ranges 80*790b75eaSAlexander Yermolovich .byte 23 # DW_FORM_sec_offset 81*790b75eaSAlexander Yermolovich .ascii "\263B" # DW_AT_GNU_addr_base 82*790b75eaSAlexander Yermolovich .byte 23 # DW_FORM_sec_offset 83*790b75eaSAlexander Yermolovich .byte 0 # EOM(1) 84*790b75eaSAlexander Yermolovich .byte 0 # EOM(2) 85*790b75eaSAlexander Yermolovich .byte 0 # EOM(3) 86*790b75eaSAlexander Yermolovich .section .debug_info,"",@progbits 87*790b75eaSAlexander Yermolovich.Lcu_begin0: 88*790b75eaSAlexander Yermolovich .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 89*790b75eaSAlexander Yermolovich.Ldebug_info_start0: 90*790b75eaSAlexander Yermolovich .short 4 # DWARF version number 91*790b75eaSAlexander Yermolovich .long .debug_abbrev # Offset Into Abbrev. Section 92*790b75eaSAlexander Yermolovich .byte 8 # Address Size (in bytes) 93*790b75eaSAlexander Yermolovich .byte 1 # Abbrev [1] 0xb:0x25 DW_TAG_compile_unit 94*790b75eaSAlexander Yermolovich .long .Lline_table_start0 # DW_AT_stmt_list 95*790b75eaSAlexander Yermolovich .long .Lskel_string0 # DW_AT_comp_dir 96*790b75eaSAlexander Yermolovich # DW_AT_GNU_pubnames 97*790b75eaSAlexander Yermolovich .long .Lskel_string1 # DW_AT_GNU_dwo_name 98*790b75eaSAlexander Yermolovich .quad -252790171939032967 # DW_AT_GNU_dwo_id 99*790b75eaSAlexander Yermolovich .quad 0 # DW_AT_low_pc 100*790b75eaSAlexander Yermolovich .long .Ldebug_ranges0 # DW_AT_ranges 101*790b75eaSAlexander Yermolovich .long .Laddr_table_base0 # DW_AT_GNU_addr_base 102*790b75eaSAlexander Yermolovich.Ldebug_info_end0: 103*790b75eaSAlexander Yermolovich .section .debug_ranges,"",@progbits 104*790b75eaSAlexander Yermolovich.Ldebug_ranges0: 105*790b75eaSAlexander Yermolovich .quad .Lfunc_begin0 106*790b75eaSAlexander Yermolovich .quad .Lfunc_end0 107*790b75eaSAlexander Yermolovich .quad .Lfunc_begin1 108*790b75eaSAlexander Yermolovich .quad .Lfunc_end1 109*790b75eaSAlexander Yermolovich .quad 0 110*790b75eaSAlexander Yermolovich .quad 0 111*790b75eaSAlexander Yermolovich .section .debug_str,"MS",@progbits,1 112*790b75eaSAlexander Yermolovich.Lskel_string0: 113*790b75eaSAlexander Yermolovich .asciz "." # string offset=0 114*790b75eaSAlexander Yermolovich.Lskel_string1: 115*790b75eaSAlexander Yermolovich .asciz "main.dwo" # string offset=58 116*790b75eaSAlexander Yermolovich .section .debug_str.dwo,"eMS",@progbits,1 117*790b75eaSAlexander Yermolovich.Linfo_string0: 118*790b75eaSAlexander Yermolovich .asciz "_Z3foov" # string offset=0 119*790b75eaSAlexander Yermolovich.Linfo_string1: 120*790b75eaSAlexander Yermolovich .asciz "foo" # string offset=8 121*790b75eaSAlexander Yermolovich.Linfo_string2: 122*790b75eaSAlexander Yermolovich .asciz "int" # string offset=12 123*790b75eaSAlexander Yermolovich.Linfo_string3: 124*790b75eaSAlexander Yermolovich .asciz "main" # string offset=16 125*790b75eaSAlexander Yermolovich.Linfo_string4: 126*790b75eaSAlexander Yermolovich .asciz "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" # string offset=21 127*790b75eaSAlexander Yermolovich.Linfo_string5: 128*790b75eaSAlexander Yermolovich .asciz "main.cpp" # string offset=126 129*790b75eaSAlexander Yermolovich.Linfo_string6: 130*790b75eaSAlexander Yermolovich .asciz "main.dwo" # string offset=135 131*790b75eaSAlexander Yermolovich .section .debug_str_offsets.dwo,"e",@progbits 132*790b75eaSAlexander Yermolovich .long 0 133*790b75eaSAlexander Yermolovich .long 8 134*790b75eaSAlexander Yermolovich .long 12 135*790b75eaSAlexander Yermolovich .long 16 136*790b75eaSAlexander Yermolovich .long 21 137*790b75eaSAlexander Yermolovich .long 126 138*790b75eaSAlexander Yermolovich .long 135 139*790b75eaSAlexander Yermolovich .section .debug_info.dwo,"e",@progbits 140*790b75eaSAlexander Yermolovich .long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit 141*790b75eaSAlexander Yermolovich.Ldebug_info_dwo_start0: 142*790b75eaSAlexander Yermolovich .short 4 # DWARF version number 143*790b75eaSAlexander Yermolovich .long 0 # Offset Into Abbrev. Section 144*790b75eaSAlexander Yermolovich .byte 8 # Address Size (in bytes) 145*790b75eaSAlexander Yermolovich .byte 1 # Abbrev [1] 0xb:0x32 DW_TAG_compile_unit 146*790b75eaSAlexander Yermolovich .byte 4 # DW_AT_producer 147*790b75eaSAlexander Yermolovich .short 33 # DW_AT_language 148*790b75eaSAlexander Yermolovich .byte 5 # DW_AT_name 149*790b75eaSAlexander Yermolovich .byte 6 # DW_AT_GNU_dwo_name 150*790b75eaSAlexander Yermolovich .quad -252790171939032967 # DW_AT_GNU_dwo_id 151*790b75eaSAlexander Yermolovich .byte 2 # Abbrev [2] 0x19:0x10 DW_TAG_subprogram 152*790b75eaSAlexander Yermolovich .byte 0 # DW_AT_low_pc 153*790b75eaSAlexander Yermolovich .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 154*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_frame_base 155*790b75eaSAlexander Yermolovich .byte 86 156*790b75eaSAlexander Yermolovich .byte 0 # DW_AT_linkage_name 157*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_name 158*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_decl_file 159*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_decl_line 160*790b75eaSAlexander Yermolovich .long 56 # DW_AT_type 161*790b75eaSAlexander Yermolovich # DW_AT_external 162*790b75eaSAlexander Yermolovich .byte 3 # Abbrev [3] 0x29:0xf DW_TAG_subprogram 163*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_low_pc 164*790b75eaSAlexander Yermolovich .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc 165*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_frame_base 166*790b75eaSAlexander Yermolovich .byte 86 167*790b75eaSAlexander Yermolovich .byte 3 # DW_AT_name 168*790b75eaSAlexander Yermolovich .byte 1 # DW_AT_decl_file 169*790b75eaSAlexander Yermolovich .byte 2 # DW_AT_decl_line 170*790b75eaSAlexander Yermolovich .long 56 # DW_AT_type 171*790b75eaSAlexander Yermolovich # DW_AT_external 172*790b75eaSAlexander Yermolovich .byte 4 # Abbrev [4] 0x38:0x4 DW_TAG_base_type 173*790b75eaSAlexander Yermolovich .byte 2 # DW_AT_name 174*790b75eaSAlexander Yermolovich .byte 5 # DW_AT_encoding 175*790b75eaSAlexander Yermolovich .byte 4 # DW_AT_byte_size 176*790b75eaSAlexander Yermolovich .byte 0 # End Of Children Mark 177*790b75eaSAlexander Yermolovich.Ldebug_info_dwo_end0: 178*790b75eaSAlexander Yermolovich .section .debug_abbrev.dwo,"e",@progbits 179*790b75eaSAlexander Yermolovich .byte 1 # Abbreviation Code 180*790b75eaSAlexander Yermolovich .byte 17 # DW_TAG_compile_unit 181*790b75eaSAlexander Yermolovich .byte 1 # DW_CHILDREN_yes 182*790b75eaSAlexander Yermolovich .byte 37 # DW_AT_producer 183*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 184*790b75eaSAlexander Yermolovich .byte 19 # DW_AT_language 185*790b75eaSAlexander Yermolovich .byte 5 # DW_FORM_data2 186*790b75eaSAlexander Yermolovich .byte 3 # DW_AT_name 187*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 188*790b75eaSAlexander Yermolovich .ascii "\260B" # DW_AT_GNU_dwo_name 189*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 190*790b75eaSAlexander Yermolovich .ascii "\261B" # DW_AT_GNU_dwo_id 191*790b75eaSAlexander Yermolovich .byte 7 # DW_FORM_data8 192*790b75eaSAlexander Yermolovich .byte 0 # EOM(1) 193*790b75eaSAlexander Yermolovich .byte 0 # EOM(2) 194*790b75eaSAlexander Yermolovich .byte 2 # Abbreviation Code 195*790b75eaSAlexander Yermolovich .byte 46 # DW_TAG_subprogram 196*790b75eaSAlexander Yermolovich .byte 0 # DW_CHILDREN_no 197*790b75eaSAlexander Yermolovich .byte 17 # DW_AT_low_pc 198*790b75eaSAlexander Yermolovich .ascii "\201>" # DW_FORM_GNU_addr_index 199*790b75eaSAlexander Yermolovich .byte 18 # DW_AT_high_pc 200*790b75eaSAlexander Yermolovich .byte 6 # DW_FORM_data4 201*790b75eaSAlexander Yermolovich .byte 64 # DW_AT_frame_base 202*790b75eaSAlexander Yermolovich .byte 24 # DW_FORM_exprloc 203*790b75eaSAlexander Yermolovich .byte 110 # DW_AT_linkage_name 204*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 205*790b75eaSAlexander Yermolovich .byte 3 # DW_AT_name 206*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 207*790b75eaSAlexander Yermolovich .byte 58 # DW_AT_decl_file 208*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 209*790b75eaSAlexander Yermolovich .byte 59 # DW_AT_decl_line 210*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 211*790b75eaSAlexander Yermolovich .byte 73 # DW_AT_type 212*790b75eaSAlexander Yermolovich .byte 19 # DW_FORM_ref4 213*790b75eaSAlexander Yermolovich .byte 63 # DW_AT_external 214*790b75eaSAlexander Yermolovich .byte 25 # DW_FORM_flag_present 215*790b75eaSAlexander Yermolovich .byte 0 # EOM(1) 216*790b75eaSAlexander Yermolovich .byte 0 # EOM(2) 217*790b75eaSAlexander Yermolovich .byte 3 # Abbreviation Code 218*790b75eaSAlexander Yermolovich .byte 46 # DW_TAG_subprogram 219*790b75eaSAlexander Yermolovich .byte 0 # DW_CHILDREN_no 220*790b75eaSAlexander Yermolovich .byte 17 # DW_AT_low_pc 221*790b75eaSAlexander Yermolovich .ascii "\201>" # DW_FORM_GNU_addr_index 222*790b75eaSAlexander Yermolovich .byte 18 # DW_AT_high_pc 223*790b75eaSAlexander Yermolovich .byte 6 # DW_FORM_data4 224*790b75eaSAlexander Yermolovich .byte 64 # DW_AT_frame_base 225*790b75eaSAlexander Yermolovich .byte 24 # DW_FORM_exprloc 226*790b75eaSAlexander Yermolovich .byte 3 # DW_AT_name 227*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 228*790b75eaSAlexander Yermolovich .byte 58 # DW_AT_decl_file 229*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 230*790b75eaSAlexander Yermolovich .byte 59 # DW_AT_decl_line 231*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 232*790b75eaSAlexander Yermolovich .byte 73 # DW_AT_type 233*790b75eaSAlexander Yermolovich .byte 19 # DW_FORM_ref4 234*790b75eaSAlexander Yermolovich .byte 63 # DW_AT_external 235*790b75eaSAlexander Yermolovich .byte 25 # DW_FORM_flag_present 236*790b75eaSAlexander Yermolovich .byte 0 # EOM(1) 237*790b75eaSAlexander Yermolovich .byte 0 # EOM(2) 238*790b75eaSAlexander Yermolovich .byte 4 # Abbreviation Code 239*790b75eaSAlexander Yermolovich .byte 36 # DW_TAG_base_type 240*790b75eaSAlexander Yermolovich .byte 0 # DW_CHILDREN_no 241*790b75eaSAlexander Yermolovich .byte 3 # DW_AT_name 242*790b75eaSAlexander Yermolovich .ascii "\202>" # DW_FORM_GNU_str_index 243*790b75eaSAlexander Yermolovich .byte 62 # DW_AT_encoding 244*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 245*790b75eaSAlexander Yermolovich .byte 11 # DW_AT_byte_size 246*790b75eaSAlexander Yermolovich .byte 11 # DW_FORM_data1 247*790b75eaSAlexander Yermolovich .byte 0 # EOM(1) 248*790b75eaSAlexander Yermolovich .byte 0 # EOM(2) 249*790b75eaSAlexander Yermolovich .byte 0 # EOM(3) 250*790b75eaSAlexander Yermolovich .section .debug_addr,"",@progbits 251*790b75eaSAlexander Yermolovich.Laddr_table_base0: 252*790b75eaSAlexander Yermolovich .quad .Lfunc_begin0 253*790b75eaSAlexander Yermolovich .quad .Lfunc_begin1 254*790b75eaSAlexander Yermolovich .section .debug_gnu_pubnames,"",@progbits 255*790b75eaSAlexander Yermolovich .long .LpubNames_end0-.LpubNames_start0 # Length of Public Names Info 256*790b75eaSAlexander Yermolovich.LpubNames_start0: 257*790b75eaSAlexander Yermolovich .short 2 # DWARF Version 258*790b75eaSAlexander Yermolovich .long .Lcu_begin0 # Offset of Compilation Unit Info 259*790b75eaSAlexander Yermolovich .long 48 # Compilation Unit Length 260*790b75eaSAlexander Yermolovich .long 41 # DIE offset 261*790b75eaSAlexander Yermolovich .byte 48 # Attributes: FUNCTION, EXTERNAL 262*790b75eaSAlexander Yermolovich .asciz "main" # External Name 263*790b75eaSAlexander Yermolovich .long 25 # DIE offset 264*790b75eaSAlexander Yermolovich .byte 48 # Attributes: FUNCTION, EXTERNAL 265*790b75eaSAlexander Yermolovich .asciz "foo" # External Name 266*790b75eaSAlexander Yermolovich .long 0 # End Mark 267*790b75eaSAlexander Yermolovich.LpubNames_end0: 268*790b75eaSAlexander Yermolovich .section .debug_gnu_pubtypes,"",@progbits 269*790b75eaSAlexander Yermolovich .long .LpubTypes_end0-.LpubTypes_start0 # Length of Public Types Info 270*790b75eaSAlexander Yermolovich.LpubTypes_start0: 271*790b75eaSAlexander Yermolovich .short 2 # DWARF Version 272*790b75eaSAlexander Yermolovich .long .Lcu_begin0 # Offset of Compilation Unit Info 273*790b75eaSAlexander Yermolovich .long 48 # Compilation Unit Length 274*790b75eaSAlexander Yermolovich .long 56 # DIE offset 275*790b75eaSAlexander Yermolovich .byte 144 # Attributes: TYPE, STATIC 276*790b75eaSAlexander Yermolovich .asciz "int" # External Name 277*790b75eaSAlexander Yermolovich .long 0 # End Mark 278*790b75eaSAlexander Yermolovich.LpubTypes_end0: 279*790b75eaSAlexander Yermolovich .ident "clang version 17.0.0 (https://github.com/llvm/llvm-project.git 640e07c49037cca41a1bfbeb916b569d8c950aea)" 280*790b75eaSAlexander Yermolovich .section ".note.GNU-stack","",@progbits 281*790b75eaSAlexander Yermolovich .addrsig 282*790b75eaSAlexander Yermolovich .addrsig_sym _Z3foov 283*790b75eaSAlexander Yermolovich .section .debug_line,"",@progbits 284*790b75eaSAlexander Yermolovich.Lline_table_start0: 285