1# clang++ -O0 -g2 -S -ffunction-sections -o 2# extern int Foo; 3# int main(int argc, char *argv[]) { 4# return 0; 5# } 6 7 .text 8 .file "main.cpp" 9 .section .text.main,"ax",@progbits 10 .globl main # -- Begin function main 11 .p2align 4, 0x90 12 .type main,@function 13main: # @main 14.Lfunc_begin0: 15 .file 0 "/repro2" "main.cpp" md5 0x44051a7da6269c029bfea564d92d1db4 16 .loc 0 2 0 # main.cpp:2:0 17 .cfi_startproc 18# %bb.0: # %entry 19 pushq %rbp 20 .cfi_def_cfa_offset 16 21 .cfi_offset %rbp, -16 22 movq %rsp, %rbp 23 .cfi_def_cfa_register %rbp 24 movl $0, -4(%rbp) 25 movl %edi, -8(%rbp) 26 movq %rsi, -16(%rbp) 27.Ltmp0: 28 .loc 0 3 3 prologue_end # main.cpp:3:3 29 xorl %eax, %eax 30 .loc 0 3 3 epilogue_begin is_stmt 0 # main.cpp:3:3 31 popq %rbp 32 .cfi_def_cfa %rsp, 8 33 retq 34.Ltmp1: 35.Lfunc_end0: 36 .size main, .Lfunc_end0-main 37 .cfi_endproc 38 # -- End function 39 .section .debug_abbrev,"",@progbits 40 .byte 1 # Abbreviation Code 41 .byte 17 # DW_TAG_compile_unit 42 .byte 1 # DW_CHILDREN_yes 43 .byte 37 # DW_AT_producer 44 .byte 37 # DW_FORM_strx1 45 .byte 19 # DW_AT_language 46 .byte 5 # DW_FORM_data2 47 .byte 3 # DW_AT_name 48 .byte 37 # DW_FORM_strx1 49 .byte 114 # DW_AT_str_offsets_base 50 .byte 23 # DW_FORM_sec_offset 51 .byte 16 # DW_AT_stmt_list 52 .byte 23 # DW_FORM_sec_offset 53 .byte 27 # DW_AT_comp_dir 54 .byte 37 # DW_FORM_strx1 55 .byte 17 # DW_AT_low_pc 56 .byte 27 # DW_FORM_addrx 57 .byte 18 # DW_AT_high_pc 58 .byte 6 # DW_FORM_data4 59 .byte 115 # DW_AT_addr_base 60 .byte 23 # DW_FORM_sec_offset 61 .byte 0 # EOM(1) 62 .byte 0 # EOM(2) 63 .byte 2 # Abbreviation Code 64 .byte 46 # DW_TAG_subprogram 65 .byte 1 # DW_CHILDREN_yes 66 .byte 17 # DW_AT_low_pc 67 .byte 27 # DW_FORM_addrx 68 .byte 18 # DW_AT_high_pc 69 .byte 6 # DW_FORM_data4 70 .byte 64 # DW_AT_frame_base 71 .byte 24 # DW_FORM_exprloc 72 .byte 3 # DW_AT_name 73 .byte 37 # DW_FORM_strx1 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 73 # DW_AT_type 79 .byte 19 # DW_FORM_ref4 80 .byte 63 # DW_AT_external 81 .byte 25 # DW_FORM_flag_present 82 .byte 0 # EOM(1) 83 .byte 0 # EOM(2) 84 .byte 3 # Abbreviation Code 85 .byte 5 # DW_TAG_formal_parameter 86 .byte 0 # DW_CHILDREN_no 87 .byte 2 # DW_AT_location 88 .byte 24 # DW_FORM_exprloc 89 .byte 3 # DW_AT_name 90 .byte 37 # DW_FORM_strx1 91 .byte 58 # DW_AT_decl_file 92 .byte 11 # DW_FORM_data1 93 .byte 59 # DW_AT_decl_line 94 .byte 11 # DW_FORM_data1 95 .byte 73 # DW_AT_type 96 .byte 19 # DW_FORM_ref4 97 .byte 0 # EOM(1) 98 .byte 0 # EOM(2) 99 .byte 4 # Abbreviation Code 100 .byte 36 # DW_TAG_base_type 101 .byte 0 # DW_CHILDREN_no 102 .byte 3 # DW_AT_name 103 .byte 37 # DW_FORM_strx1 104 .byte 62 # DW_AT_encoding 105 .byte 11 # DW_FORM_data1 106 .byte 11 # DW_AT_byte_size 107 .byte 11 # DW_FORM_data1 108 .byte 0 # EOM(1) 109 .byte 0 # EOM(2) 110 .byte 5 # Abbreviation Code 111 .byte 15 # DW_TAG_pointer_type 112 .byte 0 # DW_CHILDREN_no 113 .byte 73 # DW_AT_type 114 .byte 19 # DW_FORM_ref4 115 .byte 0 # EOM(1) 116 .byte 0 # EOM(2) 117 .byte 0 # EOM(3) 118 .section .debug_info,"",@progbits 119.Lcu_begin0: 120 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 121.Ldebug_info_start0: 122 .short 5 # DWARF version number 123 .byte 1 # DWARF Unit Type 124 .byte 8 # Address Size (in bytes) 125 .long .debug_abbrev # Offset Into Abbrev. Section 126 .byte 1 # Abbrev [1] 0xc:0x50 DW_TAG_compile_unit 127 .byte 0 # DW_AT_producer 128 .short 33 # DW_AT_language 129 .byte 1 # DW_AT_name 130 .long .Lstr_offsets_base0 # DW_AT_str_offsets_base 131 .long .Lline_table_start0 # DW_AT_stmt_list 132 .byte 2 # DW_AT_comp_dir 133 .byte 0 # DW_AT_low_pc 134 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 135 .long .Laddr_table_base0 # DW_AT_addr_base 136 .byte 2 # Abbrev [2] 0x23:0x26 DW_TAG_subprogram 137 .byte 0 # DW_AT_low_pc 138 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 139 .byte 1 # DW_AT_frame_base 140 .byte 86 141 .byte 3 # DW_AT_name 142 .byte 0 # DW_AT_decl_file 143 .byte 2 # DW_AT_decl_line 144 .long 73 # DW_AT_type 145 # DW_AT_external 146 .byte 3 # Abbrev [3] 0x32:0xb DW_TAG_formal_parameter 147 .byte 2 # DW_AT_location 148 .byte 145 149 .byte 120 150 .byte 5 # DW_AT_name 151 .byte 0 # DW_AT_decl_file 152 .byte 2 # DW_AT_decl_line 153 .long 73 # DW_AT_type 154 .byte 3 # Abbrev [3] 0x3d:0xb DW_TAG_formal_parameter 155 .byte 2 # DW_AT_location 156 .byte 145 157 .byte 112 158 .byte 6 # DW_AT_name 159 .byte 0 # DW_AT_decl_file 160 .byte 2 # DW_AT_decl_line 161 .long 77 # DW_AT_type 162 .byte 0 # End Of Children Mark 163 .byte 4 # Abbrev [4] 0x49:0x4 DW_TAG_base_type 164 .byte 4 # DW_AT_name 165 .byte 5 # DW_AT_encoding 166 .byte 4 # DW_AT_byte_size 167 .byte 5 # Abbrev [5] 0x4d:0x5 DW_TAG_pointer_type 168 .long 82 # DW_AT_type 169 .byte 5 # Abbrev [5] 0x52:0x5 DW_TAG_pointer_type 170 .long 87 # DW_AT_type 171 .byte 4 # Abbrev [4] 0x57:0x4 DW_TAG_base_type 172 .byte 7 # DW_AT_name 173 .byte 6 # DW_AT_encoding 174 .byte 1 # DW_AT_byte_size 175 .byte 0 # End Of Children Mark 176.Ldebug_info_end0: 177 .section .debug_str_offsets,"",@progbits 178 .long 36 # Length of String Offsets Set 179 .short 5 180 .short 0 181.Lstr_offsets_base0: 182 .section .debug_str,"MS",@progbits,1 183.Linfo_string0: 184 .asciz "clang version 19.0.0git (git@github.com:ayermolo/llvm-project.git 6c884ef47e88e5ff18353819e806fe1b84e3c5b5)" # string offset=0 185.Linfo_string1: 186 .asciz "main.cpp" # string offset=108 187.Linfo_string2: 188 .asciz "/repro2" # string offset=117 189.Linfo_string3: 190 .asciz "main" # string offset=162 191.Linfo_string4: 192 .asciz "int" # string offset=167 193.Linfo_string5: 194 .asciz "argc" # string offset=171 195.Linfo_string6: 196 .asciz "argv" # string offset=176 197.Linfo_string7: 198 .asciz "char" # string offset=181 199 .section .debug_str_offsets,"",@progbits 200 .long .Linfo_string0 201 .long .Linfo_string1 202 .long .Linfo_string2 203 .long .Linfo_string3 204 .long .Linfo_string4 205 .long .Linfo_string5 206 .long .Linfo_string6 207 .long .Linfo_string7 208 .section .debug_addr,"",@progbits 209 .long .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 210.Ldebug_addr_start0: 211 .short 5 # DWARF version number 212 .byte 8 # Address size 213 .byte 0 # Segment selector size 214.Laddr_table_base0: 215 .quad .Lfunc_begin0 216.Ldebug_addr_end0: 217 .ident "clang version 19.0.0git (git@github.com:ayermolo/llvm-project.git 6c884ef47e88e5ff18353819e806fe1b84e3c5b5)" 218 .section ".note.GNU-stack","",@progbits 219 .addrsig 220 .section .debug_line,"",@progbits 221.Lline_table_start0: 222