1## clang++ -fbasic-block-sections=all -ffunction-sections -g2 -gdwarf-4 2## int doStuffOther(int val) { 3## if (val) 4## ++val; 5## return val; 6## } 7## 8## int mainOther(int argc, const char** argv) { 9## return doStuffOther(argc); 10## } 11 .text 12 .file "mainOther.cpp" 13 .section .text._Z12doStuffOtheri,"ax",@progbits 14 .globl _Z12doStuffOtheri # -- Begin function _Z12doStuffOtheri 15 .p2align 4, 0x90 16 .type _Z12doStuffOtheri,@function 17_Z12doStuffOtheri: # @_Z12doStuffOtheri 18.Lfunc_begin0: 19 .file 1 "." "mainOther.cpp" 20 .loc 1 1 0 # mainOther.cpp:1:0 21 .cfi_startproc 22# %bb.0: # %entry 23 pushq %rbp 24 .cfi_def_cfa_offset 16 25 .cfi_offset %rbp, -16 26 movq %rsp, %rbp 27 .cfi_def_cfa_register %rbp 28 movl %edi, -4(%rbp) 29.Ltmp0: 30 .loc 1 2 8 prologue_end # mainOther.cpp:2:8 31 cmpl $0, -4(%rbp) 32.Ltmp1: 33 .loc 1 2 8 is_stmt 0 # mainOther.cpp:2:8 34 je _Z12doStuffOtheri.__part.2 35 jmp _Z12doStuffOtheri.__part.1 36.LBB_END0_0: 37 .cfi_endproc 38 .section .text._Z12doStuffOtheri,"ax",@progbits,unique,1 39_Z12doStuffOtheri.__part.1: # %if.then 40 .cfi_startproc 41 .cfi_def_cfa %rbp, 16 42 .cfi_offset %rbp, -16 43 .loc 1 3 6 is_stmt 1 # mainOther.cpp:3:6 44 movl -4(%rbp), %eax 45 addl $1, %eax 46 movl %eax, -4(%rbp) 47 jmp _Z12doStuffOtheri.__part.2 48.LBB_END0_1: 49 .size _Z12doStuffOtheri.__part.1, .LBB_END0_1-_Z12doStuffOtheri.__part.1 50 .cfi_endproc 51 .section .text._Z12doStuffOtheri,"ax",@progbits,unique,2 52_Z12doStuffOtheri.__part.2: # %if.end 53 .cfi_startproc 54 .cfi_def_cfa %rbp, 16 55 .cfi_offset %rbp, -16 56 .loc 1 4 11 # mainOther.cpp:4:11 57 movl -4(%rbp), %eax 58 .loc 1 4 4 epilogue_begin is_stmt 0 # mainOther.cpp:4:4 59 popq %rbp 60 .cfi_def_cfa %rsp, 8 61 retq 62.LBB_END0_2: 63 .size _Z12doStuffOtheri.__part.2, .LBB_END0_2-_Z12doStuffOtheri.__part.2 64 .cfi_endproc 65 .section .text._Z12doStuffOtheri,"ax",@progbits 66.Lfunc_end0: 67 .size _Z12doStuffOtheri, .Lfunc_end0-_Z12doStuffOtheri 68 # -- End function 69 .section .text._Z9mainOtheriPPKc,"ax",@progbits 70 .globl _Z9mainOtheriPPKc # -- Begin function _Z9mainOtheriPPKc 71 .p2align 4, 0x90 72 .type _Z9mainOtheriPPKc,@function 73_Z9mainOtheriPPKc: # @_Z9mainOtheriPPKc 74.Lfunc_begin1: 75 .loc 1 7 0 is_stmt 1 # mainOther.cpp:7:0 76 .cfi_startproc 77# %bb.0: # %entry 78 pushq %rbp 79 .cfi_def_cfa_offset 16 80 .cfi_offset %rbp, -16 81 movq %rsp, %rbp 82 .cfi_def_cfa_register %rbp 83 subq $16, %rsp 84 movl %edi, -4(%rbp) 85 movq %rsi, -16(%rbp) 86.Ltmp2: 87 .loc 1 8 27 prologue_end # mainOther.cpp:8:27 88 movl -4(%rbp), %edi 89 .loc 1 8 14 is_stmt 0 # mainOther.cpp:8:14 90 callq _Z12doStuffOtheri 91 .loc 1 8 6 epilogue_begin # mainOther.cpp:8:6 92 addq $16, %rsp 93 popq %rbp 94 .cfi_def_cfa %rsp, 8 95 retq 96.LBB_END1_0: 97 .cfi_endproc 98.Lfunc_end1: 99 .size _Z9mainOtheriPPKc, .Lfunc_end1-_Z9mainOtheriPPKc 100 # -- End function 101 .section .debug_abbrev,"",@progbits 102 .byte 1 # Abbreviation Code 103 .byte 17 # DW_TAG_compile_unit 104 .byte 1 # DW_CHILDREN_yes 105 .byte 37 # DW_AT_producer 106 .byte 14 # DW_FORM_strp 107 .byte 19 # DW_AT_language 108 .byte 5 # DW_FORM_data2 109 .byte 3 # DW_AT_name 110 .byte 14 # DW_FORM_strp 111 .byte 16 # DW_AT_stmt_list 112 .byte 23 # DW_FORM_sec_offset 113 .byte 27 # DW_AT_comp_dir 114 .byte 14 # DW_FORM_strp 115 .byte 17 # DW_AT_low_pc 116 .byte 1 # DW_FORM_addr 117 .byte 85 # DW_AT_ranges 118 .byte 23 # DW_FORM_sec_offset 119 .byte 0 # EOM(1) 120 .byte 0 # EOM(2) 121 .byte 2 # Abbreviation Code 122 .byte 46 # DW_TAG_subprogram 123 .byte 1 # DW_CHILDREN_yes 124 .byte 85 # DW_AT_ranges 125 .byte 23 # DW_FORM_sec_offset 126 .byte 64 # DW_AT_frame_base 127 .byte 24 # DW_FORM_exprloc 128 .byte 110 # DW_AT_linkage_name 129 .byte 14 # DW_FORM_strp 130 .byte 3 # DW_AT_name 131 .byte 14 # DW_FORM_strp 132 .byte 58 # DW_AT_decl_file 133 .byte 11 # DW_FORM_data1 134 .byte 59 # DW_AT_decl_line 135 .byte 11 # DW_FORM_data1 136 .byte 73 # DW_AT_type 137 .byte 19 # DW_FORM_ref4 138 .byte 63 # DW_AT_external 139 .byte 25 # DW_FORM_flag_present 140 .byte 0 # EOM(1) 141 .byte 0 # EOM(2) 142 .byte 3 # Abbreviation Code 143 .byte 5 # DW_TAG_formal_parameter 144 .byte 0 # DW_CHILDREN_no 145 .byte 2 # DW_AT_location 146 .byte 24 # DW_FORM_exprloc 147 .byte 3 # DW_AT_name 148 .byte 14 # DW_FORM_strp 149 .byte 58 # DW_AT_decl_file 150 .byte 11 # DW_FORM_data1 151 .byte 59 # DW_AT_decl_line 152 .byte 11 # DW_FORM_data1 153 .byte 73 # DW_AT_type 154 .byte 19 # DW_FORM_ref4 155 .byte 0 # EOM(1) 156 .byte 0 # EOM(2) 157 .byte 4 # Abbreviation Code 158 .byte 46 # DW_TAG_subprogram 159 .byte 1 # DW_CHILDREN_yes 160 .byte 17 # DW_AT_low_pc 161 .byte 1 # DW_FORM_addr 162 .byte 18 # DW_AT_high_pc 163 .byte 6 # DW_FORM_data4 164 .byte 64 # DW_AT_frame_base 165 .byte 24 # DW_FORM_exprloc 166 .byte 110 # DW_AT_linkage_name 167 .byte 14 # DW_FORM_strp 168 .byte 3 # DW_AT_name 169 .byte 14 # DW_FORM_strp 170 .byte 58 # DW_AT_decl_file 171 .byte 11 # DW_FORM_data1 172 .byte 59 # DW_AT_decl_line 173 .byte 11 # DW_FORM_data1 174 .byte 73 # DW_AT_type 175 .byte 19 # DW_FORM_ref4 176 .byte 63 # DW_AT_external 177 .byte 25 # DW_FORM_flag_present 178 .byte 0 # EOM(1) 179 .byte 0 # EOM(2) 180 .byte 5 # Abbreviation Code 181 .byte 36 # DW_TAG_base_type 182 .byte 0 # DW_CHILDREN_no 183 .byte 3 # DW_AT_name 184 .byte 14 # DW_FORM_strp 185 .byte 62 # DW_AT_encoding 186 .byte 11 # DW_FORM_data1 187 .byte 11 # DW_AT_byte_size 188 .byte 11 # DW_FORM_data1 189 .byte 0 # EOM(1) 190 .byte 0 # EOM(2) 191 .byte 6 # Abbreviation Code 192 .byte 15 # DW_TAG_pointer_type 193 .byte 0 # DW_CHILDREN_no 194 .byte 73 # DW_AT_type 195 .byte 19 # DW_FORM_ref4 196 .byte 0 # EOM(1) 197 .byte 0 # EOM(2) 198 .byte 7 # Abbreviation Code 199 .byte 38 # DW_TAG_const_type 200 .byte 0 # DW_CHILDREN_no 201 .byte 73 # DW_AT_type 202 .byte 19 # DW_FORM_ref4 203 .byte 0 # EOM(1) 204 .byte 0 # EOM(2) 205 .byte 0 # EOM(3) 206 .section .debug_info,"",@progbits 207.Lcu_begin0: 208 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 209.Ldebug_info_start0: 210 .short 4 # DWARF version number 211 .long .debug_abbrev # Offset Into Abbrev. Section 212 .byte 8 # Address Size (in bytes) 213 .byte 1 # Abbrev [1] 0xb:0x9b DW_TAG_compile_unit 214 .long .Linfo_string0 # DW_AT_producer 215 .short 33 # DW_AT_language 216 .long .Linfo_string1 # DW_AT_name 217 .long .Lline_table_start0 # DW_AT_stmt_list 218 .long .Linfo_string2 # DW_AT_comp_dir 219 .quad 0 # DW_AT_low_pc 220 .long .Ldebug_ranges1 # DW_AT_ranges 221 .byte 2 # Abbrev [2] 0x2a:0x24 DW_TAG_subprogram 222 .long .Ldebug_ranges0 # DW_AT_ranges 223 .byte 1 # DW_AT_frame_base 224 .byte 86 225 .long .Linfo_string3 # DW_AT_linkage_name 226 .long .Linfo_string4 # DW_AT_name 227 .byte 1 # DW_AT_decl_file 228 .byte 1 # DW_AT_decl_line 229 .long 136 # DW_AT_type 230 # DW_AT_external 231 .byte 3 # Abbrev [3] 0x3f:0xe DW_TAG_formal_parameter 232 .byte 2 # DW_AT_location 233 .byte 145 234 .byte 124 235 .long .Linfo_string8 # DW_AT_name 236 .byte 1 # DW_AT_decl_file 237 .byte 1 # DW_AT_decl_line 238 .long 136 # DW_AT_type 239 .byte 0 # End Of Children Mark 240 .byte 4 # Abbrev [4] 0x4e:0x3a DW_TAG_subprogram 241 .quad .Lfunc_begin1 # DW_AT_low_pc 242 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc 243 .byte 1 # DW_AT_frame_base 244 .byte 86 245 .long .Linfo_string6 # DW_AT_linkage_name 246 .long .Linfo_string7 # DW_AT_name 247 .byte 1 # DW_AT_decl_file 248 .byte 7 # DW_AT_decl_line 249 .long 136 # DW_AT_type 250 # DW_AT_external 251 .byte 3 # Abbrev [3] 0x6b:0xe DW_TAG_formal_parameter 252 .byte 2 # DW_AT_location 253 .byte 145 254 .byte 124 255 .long .Linfo_string9 # DW_AT_name 256 .byte 1 # DW_AT_decl_file 257 .byte 7 # DW_AT_decl_line 258 .long 136 # DW_AT_type 259 .byte 3 # Abbrev [3] 0x79:0xe DW_TAG_formal_parameter 260 .byte 2 # DW_AT_location 261 .byte 145 262 .byte 112 263 .long .Linfo_string10 # DW_AT_name 264 .byte 1 # DW_AT_decl_file 265 .byte 7 # DW_AT_decl_line 266 .long 143 # DW_AT_type 267 .byte 0 # End Of Children Mark 268 .byte 5 # Abbrev [5] 0x88:0x7 DW_TAG_base_type 269 .long .Linfo_string5 # DW_AT_name 270 .byte 5 # DW_AT_encoding 271 .byte 4 # DW_AT_byte_size 272 .byte 6 # Abbrev [6] 0x8f:0x5 DW_TAG_pointer_type 273 .long 148 # DW_AT_type 274 .byte 6 # Abbrev [6] 0x94:0x5 DW_TAG_pointer_type 275 .long 153 # DW_AT_type 276 .byte 7 # Abbrev [7] 0x99:0x5 DW_TAG_const_type 277 .long 158 # DW_AT_type 278 .byte 5 # Abbrev [5] 0x9e:0x7 DW_TAG_base_type 279 .long .Linfo_string11 # DW_AT_name 280 .byte 6 # DW_AT_encoding 281 .byte 1 # DW_AT_byte_size 282 .byte 0 # End Of Children Mark 283.Ldebug_info_end0: 284 .section .debug_ranges,"",@progbits 285.Ldebug_ranges0: 286 .quad _Z12doStuffOtheri.__part.1 287 .quad .LBB_END0_1 288 .quad _Z12doStuffOtheri.__part.2 289 .quad .LBB_END0_2 290 .quad .Lfunc_begin0 291 .quad .Lfunc_end0 292 .quad 0 293 .quad 0 294.Ldebug_ranges1: 295 .quad _Z12doStuffOtheri.__part.1 296 .quad .LBB_END0_1 297 .quad _Z12doStuffOtheri.__part.2 298 .quad .LBB_END0_2 299 .quad .Lfunc_begin0 300 .quad .Lfunc_end0 301 .quad .Lfunc_begin1 302 .quad .Lfunc_end1 303 .quad 0 304 .quad 0 305 .section .debug_str,"MS",@progbits,1 306.Linfo_string0: 307 .asciz "clang version 19.0.0git (git@github.com:llvm/llvm-project.git df542e1ed82bd4e5a9e345d3a3ae63a76893a0cf)" # string offset=0 308.Linfo_string1: 309 .asciz "mainOther.cpp" # string offset=104 310.Linfo_string2: 311 .asciz "." # string offset=118 312.Linfo_string3: 313 .asciz "_Z12doStuffOtheri" # string offset=120 314.Linfo_string4: 315 .asciz "doStuffOther" # string offset=138 316.Linfo_string5: 317 .asciz "int" # string offset=151 318.Linfo_string6: 319 .asciz "_Z9mainOtheriPPKc" # string offset=155 320.Linfo_string7: 321 .asciz "mainOther" # string offset=173 322.Linfo_string8: 323 .asciz "val" # string offset=183 324.Linfo_string9: 325 .asciz "argc" # string offset=187 326.Linfo_string10: 327 .asciz "argv" # string offset=192 328.Linfo_string11: 329 .asciz "char" # string offset=197 330 .ident "clang version 19.0.0git (git@github.com:llvm/llvm-project.git df542e1ed82bd4e5a9e345d3a3ae63a76893a0cf)" 331 .section ".note.GNU-stack","",@progbits 332 .addrsig 333 .addrsig_sym _Z12doStuffOtheri 334 .section .debug_line,"",@progbits 335.Lline_table_start0: 336