1*16711b43Scmtice# REQUIRES: x86 2*16711b43Scmtice# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o 3*16711b43Scmtice# RUN: not ld.lld --debug-names %t.o -o /dev/null 2>&1 | \ 4*16711b43Scmtice# RUN: FileCheck -DFILE=%t.o --implicit-check-not=error: %s 5*16711b43Scmtice 6*16711b43Scmtice# CHECK: error: [[FILE]]:(.debug_names): found DWARF64, which is currently unsupported 7*16711b43Scmtice 8*16711b43Scmtice.ifdef GEN 9*16711b43Scmtice//--- a.cc 10*16711b43Scmticestruct t1 {}; 11*16711b43Scmticeextern "C" void _start(t1) {} 12*16711b43Scmtice//--- gen 13*16711b43Scmticeclang --target=x86_64-linux -S -g -gpubnames -gdwarf64 a.cc -o - 14*16711b43Scmtice.endif 15*16711b43Scmtice .text 16*16711b43Scmtice .file "a.cc" 17*16711b43Scmtice .globl _start # -- Begin function _start 18*16711b43Scmtice .p2align 4, 0x90 19*16711b43Scmtice .type _start,@function 20*16711b43Scmtice_start: # @_start 21*16711b43Scmtice.Lfunc_begin0: 22*16711b43Scmtice .file 0 "/proc/self/cwd" "a.cc" md5 0x6835f89a7d36054002b51e54e47d852e 23*16711b43Scmtice .loc 0 2 0 # a.cc:2:0 24*16711b43Scmtice .cfi_startproc 25*16711b43Scmtice# %bb.0: # %entry 26*16711b43Scmtice pushq %rbp 27*16711b43Scmtice .cfi_def_cfa_offset 16 28*16711b43Scmtice .cfi_offset %rbp, -16 29*16711b43Scmtice movq %rsp, %rbp 30*16711b43Scmtice .cfi_def_cfa_register %rbp 31*16711b43Scmtice.Ltmp0: 32*16711b43Scmtice .loc 0 2 29 prologue_end epilogue_begin # a.cc:2:29 33*16711b43Scmtice popq %rbp 34*16711b43Scmtice .cfi_def_cfa %rsp, 8 35*16711b43Scmtice retq 36*16711b43Scmtice.Ltmp1: 37*16711b43Scmtice.Lfunc_end0: 38*16711b43Scmtice .size _start, .Lfunc_end0-_start 39*16711b43Scmtice .cfi_endproc 40*16711b43Scmtice # -- End function 41*16711b43Scmtice .section .debug_abbrev,"",@progbits 42*16711b43Scmtice .byte 1 # Abbreviation Code 43*16711b43Scmtice .byte 17 # DW_TAG_compile_unit 44*16711b43Scmtice .byte 1 # DW_CHILDREN_yes 45*16711b43Scmtice .byte 37 # DW_AT_producer 46*16711b43Scmtice .byte 37 # DW_FORM_strx1 47*16711b43Scmtice .byte 19 # DW_AT_language 48*16711b43Scmtice .byte 5 # DW_FORM_data2 49*16711b43Scmtice .byte 3 # DW_AT_name 50*16711b43Scmtice .byte 37 # DW_FORM_strx1 51*16711b43Scmtice .byte 114 # DW_AT_str_offsets_base 52*16711b43Scmtice .byte 23 # DW_FORM_sec_offset 53*16711b43Scmtice .byte 16 # DW_AT_stmt_list 54*16711b43Scmtice .byte 23 # DW_FORM_sec_offset 55*16711b43Scmtice .byte 27 # DW_AT_comp_dir 56*16711b43Scmtice .byte 37 # DW_FORM_strx1 57*16711b43Scmtice .byte 17 # DW_AT_low_pc 58*16711b43Scmtice .byte 27 # DW_FORM_addrx 59*16711b43Scmtice .byte 18 # DW_AT_high_pc 60*16711b43Scmtice .byte 6 # DW_FORM_data4 61*16711b43Scmtice .byte 115 # DW_AT_addr_base 62*16711b43Scmtice .byte 23 # DW_FORM_sec_offset 63*16711b43Scmtice .byte 0 # EOM(1) 64*16711b43Scmtice .byte 0 # EOM(2) 65*16711b43Scmtice .byte 2 # Abbreviation Code 66*16711b43Scmtice .byte 46 # DW_TAG_subprogram 67*16711b43Scmtice .byte 1 # DW_CHILDREN_yes 68*16711b43Scmtice .byte 17 # DW_AT_low_pc 69*16711b43Scmtice .byte 27 # DW_FORM_addrx 70*16711b43Scmtice .byte 18 # DW_AT_high_pc 71*16711b43Scmtice .byte 6 # DW_FORM_data4 72*16711b43Scmtice .byte 64 # DW_AT_frame_base 73*16711b43Scmtice .byte 24 # DW_FORM_exprloc 74*16711b43Scmtice .byte 3 # DW_AT_name 75*16711b43Scmtice .byte 37 # DW_FORM_strx1 76*16711b43Scmtice .byte 58 # DW_AT_decl_file 77*16711b43Scmtice .byte 11 # DW_FORM_data1 78*16711b43Scmtice .byte 59 # DW_AT_decl_line 79*16711b43Scmtice .byte 11 # DW_FORM_data1 80*16711b43Scmtice .byte 63 # DW_AT_external 81*16711b43Scmtice .byte 25 # DW_FORM_flag_present 82*16711b43Scmtice .byte 0 # EOM(1) 83*16711b43Scmtice .byte 0 # EOM(2) 84*16711b43Scmtice .byte 3 # Abbreviation Code 85*16711b43Scmtice .byte 5 # DW_TAG_formal_parameter 86*16711b43Scmtice .byte 0 # DW_CHILDREN_no 87*16711b43Scmtice .byte 2 # DW_AT_location 88*16711b43Scmtice .byte 24 # DW_FORM_exprloc 89*16711b43Scmtice .byte 58 # DW_AT_decl_file 90*16711b43Scmtice .byte 11 # DW_FORM_data1 91*16711b43Scmtice .byte 59 # DW_AT_decl_line 92*16711b43Scmtice .byte 11 # DW_FORM_data1 93*16711b43Scmtice .byte 73 # DW_AT_type 94*16711b43Scmtice .byte 19 # DW_FORM_ref4 95*16711b43Scmtice .byte 0 # EOM(1) 96*16711b43Scmtice .byte 0 # EOM(2) 97*16711b43Scmtice .byte 4 # Abbreviation Code 98*16711b43Scmtice .byte 19 # DW_TAG_structure_type 99*16711b43Scmtice .byte 0 # DW_CHILDREN_no 100*16711b43Scmtice .byte 54 # DW_AT_calling_convention 101*16711b43Scmtice .byte 11 # DW_FORM_data1 102*16711b43Scmtice .byte 3 # DW_AT_name 103*16711b43Scmtice .byte 37 # DW_FORM_strx1 104*16711b43Scmtice .byte 11 # DW_AT_byte_size 105*16711b43Scmtice .byte 11 # DW_FORM_data1 106*16711b43Scmtice .byte 58 # DW_AT_decl_file 107*16711b43Scmtice .byte 11 # DW_FORM_data1 108*16711b43Scmtice .byte 59 # DW_AT_decl_line 109*16711b43Scmtice .byte 11 # DW_FORM_data1 110*16711b43Scmtice .byte 0 # EOM(1) 111*16711b43Scmtice .byte 0 # EOM(2) 112*16711b43Scmtice .byte 0 # EOM(3) 113*16711b43Scmtice .section .debug_info,"",@progbits 114*16711b43Scmtice.Lcu_begin0: 115*16711b43Scmtice .long 4294967295 # DWARF64 Mark 116*16711b43Scmtice .quad .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit 117*16711b43Scmtice.Ldebug_info_start0: 118*16711b43Scmtice .short 5 # DWARF version number 119*16711b43Scmtice .byte 1 # DWARF Unit Type 120*16711b43Scmtice .byte 8 # Address Size (in bytes) 121*16711b43Scmtice .quad .debug_abbrev # Offset Into Abbrev. Section 122*16711b43Scmtice .byte 1 # Abbrev [1] 0x18:0x40 DW_TAG_compile_unit 123*16711b43Scmtice .byte 0 # DW_AT_producer 124*16711b43Scmtice .short 33 # DW_AT_language 125*16711b43Scmtice .byte 1 # DW_AT_name 126*16711b43Scmtice .quad .Lstr_offsets_base0 # DW_AT_str_offsets_base 127*16711b43Scmtice .quad .Lline_table_start0 # DW_AT_stmt_list 128*16711b43Scmtice .byte 2 # DW_AT_comp_dir 129*16711b43Scmtice .byte 0 # DW_AT_low_pc 130*16711b43Scmtice .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 131*16711b43Scmtice .quad .Laddr_table_base0 # DW_AT_addr_base 132*16711b43Scmtice .byte 2 # Abbrev [2] 0x3b:0x16 DW_TAG_subprogram 133*16711b43Scmtice .byte 0 # DW_AT_low_pc 134*16711b43Scmtice .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc 135*16711b43Scmtice .byte 1 # DW_AT_frame_base 136*16711b43Scmtice .byte 86 137*16711b43Scmtice .byte 3 # DW_AT_name 138*16711b43Scmtice .byte 0 # DW_AT_decl_file 139*16711b43Scmtice .byte 2 # DW_AT_decl_line 140*16711b43Scmtice # DW_AT_external 141*16711b43Scmtice .byte 3 # Abbrev [3] 0x46:0xa DW_TAG_formal_parameter 142*16711b43Scmtice .byte 2 # DW_AT_location 143*16711b43Scmtice .byte 145 144*16711b43Scmtice .byte 127 145*16711b43Scmtice .byte 0 # DW_AT_decl_file 146*16711b43Scmtice .byte 2 # DW_AT_decl_line 147*16711b43Scmtice .long 81 # DW_AT_type 148*16711b43Scmtice .byte 0 # End Of Children Mark 149*16711b43Scmtice .byte 4 # Abbrev [4] 0x51:0x6 DW_TAG_structure_type 150*16711b43Scmtice .byte 5 # DW_AT_calling_convention 151*16711b43Scmtice .byte 4 # DW_AT_name 152*16711b43Scmtice .byte 1 # DW_AT_byte_size 153*16711b43Scmtice .byte 0 # DW_AT_decl_file 154*16711b43Scmtice .byte 1 # DW_AT_decl_line 155*16711b43Scmtice .byte 0 # End Of Children Mark 156*16711b43Scmtice.Ldebug_info_end0: 157*16711b43Scmtice .section .debug_str_offsets,"",@progbits 158*16711b43Scmtice .long 4294967295 # DWARF64 Mark 159*16711b43Scmtice .quad 44 # Length of String Offsets Set 160*16711b43Scmtice .short 5 161*16711b43Scmtice .short 0 162*16711b43Scmtice.Lstr_offsets_base0: 163*16711b43Scmtice .section .debug_str,"MS",@progbits,1 164*16711b43Scmtice.Linfo_string0: 165*16711b43Scmtice .byte 0 # string offset=0 166*16711b43Scmtice.Linfo_string1: 167*16711b43Scmtice .asciz "a.cc" # string offset=1 168*16711b43Scmtice.Linfo_string2: 169*16711b43Scmtice .asciz "/proc/self/cwd" # string offset=6 170*16711b43Scmtice.Linfo_string3: 171*16711b43Scmtice .asciz "_start" # string offset=21 172*16711b43Scmtice.Linfo_string4: 173*16711b43Scmtice .asciz "t1" # string offset=28 174*16711b43Scmtice .section .debug_str_offsets,"",@progbits 175*16711b43Scmtice .quad .Linfo_string0 176*16711b43Scmtice .quad .Linfo_string1 177*16711b43Scmtice .quad .Linfo_string2 178*16711b43Scmtice .quad .Linfo_string3 179*16711b43Scmtice .quad .Linfo_string4 180*16711b43Scmtice .section .debug_addr,"",@progbits 181*16711b43Scmtice .long 4294967295 # DWARF64 Mark 182*16711b43Scmtice .quad .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution 183*16711b43Scmtice.Ldebug_addr_start0: 184*16711b43Scmtice .short 5 # DWARF version number 185*16711b43Scmtice .byte 8 # Address size 186*16711b43Scmtice .byte 0 # Segment selector size 187*16711b43Scmtice.Laddr_table_base0: 188*16711b43Scmtice .quad .Lfunc_begin0 189*16711b43Scmtice.Ldebug_addr_end0: 190*16711b43Scmtice .section .debug_names,"",@progbits 191*16711b43Scmtice .long 4294967295 # DWARF64 Mark 192*16711b43Scmtice .quad .Lnames_end0-.Lnames_start0 # Header: unit length 193*16711b43Scmtice.Lnames_start0: 194*16711b43Scmtice .short 5 # Header: version 195*16711b43Scmtice .short 0 # Header: padding 196*16711b43Scmtice .long 1 # Header: compilation unit count 197*16711b43Scmtice .long 0 # Header: local type unit count 198*16711b43Scmtice .long 0 # Header: foreign type unit count 199*16711b43Scmtice .long 2 # Header: bucket count 200*16711b43Scmtice .long 2 # Header: name count 201*16711b43Scmtice .long .Lnames_abbrev_end0-.Lnames_abbrev_start0 # Header: abbreviation table size 202*16711b43Scmtice .long 8 # Header: augmentation string size 203*16711b43Scmtice .ascii "LLVM0700" # Header: augmentation string 204*16711b43Scmtice .quad .Lcu_begin0 # Compilation unit 0 205*16711b43Scmtice .long 1 # Bucket 0 206*16711b43Scmtice .long 0 # Bucket 1 207*16711b43Scmtice .long 5863786 # Hash in Bucket 0 208*16711b43Scmtice .long -304389582 # Hash in Bucket 0 209*16711b43Scmtice .quad .Linfo_string4 # String in Bucket 0: t1 210*16711b43Scmtice .quad .Linfo_string3 # String in Bucket 0: _start 211*16711b43Scmtice .quad .Lnames1-.Lnames_entries0 # Offset in Bucket 0 212*16711b43Scmtice .quad .Lnames0-.Lnames_entries0 # Offset in Bucket 0 213*16711b43Scmtice.Lnames_abbrev_start0: 214*16711b43Scmtice .byte 1 # Abbrev code 215*16711b43Scmtice .byte 19 # DW_TAG_structure_type 216*16711b43Scmtice .byte 3 # DW_IDX_die_offset 217*16711b43Scmtice .byte 19 # DW_FORM_ref4 218*16711b43Scmtice .byte 4 # DW_IDX_parent 219*16711b43Scmtice .byte 25 # DW_FORM_flag_present 220*16711b43Scmtice .byte 0 # End of abbrev 221*16711b43Scmtice .byte 0 # End of abbrev 222*16711b43Scmtice .byte 2 # Abbrev code 223*16711b43Scmtice .byte 46 # DW_TAG_subprogram 224*16711b43Scmtice .byte 3 # DW_IDX_die_offset 225*16711b43Scmtice .byte 19 # DW_FORM_ref4 226*16711b43Scmtice .byte 4 # DW_IDX_parent 227*16711b43Scmtice .byte 25 # DW_FORM_flag_present 228*16711b43Scmtice .byte 0 # End of abbrev 229*16711b43Scmtice .byte 0 # End of abbrev 230*16711b43Scmtice .byte 0 # End of abbrev list 231*16711b43Scmtice.Lnames_abbrev_end0: 232*16711b43Scmtice.Lnames_entries0: 233*16711b43Scmtice.Lnames1: 234*16711b43Scmtice.L1: 235*16711b43Scmtice .byte 1 # Abbreviation code 236*16711b43Scmtice .long 81 # DW_IDX_die_offset 237*16711b43Scmtice .byte 0 # DW_IDX_parent 238*16711b43Scmtice # End of list: t1 239*16711b43Scmtice.Lnames0: 240*16711b43Scmtice.L0: 241*16711b43Scmtice .byte 2 # Abbreviation code 242*16711b43Scmtice .long 59 # DW_IDX_die_offset 243*16711b43Scmtice .byte 0 # DW_IDX_parent 244*16711b43Scmtice # End of list: _start 245*16711b43Scmtice .p2align 2, 0x0 246*16711b43Scmtice.Lnames_end0: 247*16711b43Scmtice .section ".note.GNU-stack","",@progbits 248*16711b43Scmtice .addrsig 249*16711b43Scmtice .section .debug_line,"",@progbits 250*16711b43Scmtice.Lline_table_start0: 251