2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t %s
3 # RUN: ld.lld --gdb-index --gc-sections -o %t2 %t
4 # RUN: llvm-dwarfdump -gdb-index %t2 | FileCheck %s
6 # CHECK: Address area offset = 0x28, has 0 entries:
8 # Generated with: (clang r302976)
9 # echo "void _start() { __builtin_unreachable(); }" | \
10 # clang -Os -g -S -o gdb-index-empty.s -x c - -Xclang -fdebug-compilation-dir -Xclang .
14 .type _start,@function
19 .section .debug_abbrev,"",@progbits
20 .byte 1 # Abbreviation Code
21 .byte 17 # DW_TAG_compile_unit
22 .byte 1 # DW_CHILDREN_yes
23 .byte 37 # DW_AT_producer
24 .byte 14 # DW_FORM_strp
25 .byte 19 # DW_AT_language
26 .byte 5 # DW_FORM_data2
28 .byte 14 # DW_FORM_strp
29 .byte 16 # DW_AT_stmt_list
30 .byte 23 # DW_FORM_sec_offset
31 .byte 27 # DW_AT_comp_dir
32 .byte 14 # DW_FORM_strp
33 .byte 17 # DW_AT_low_pc
34 .byte 1 # DW_FORM_addr
35 .byte 18 # DW_AT_high_pc
36 .byte 6 # DW_FORM_data4
39 .byte 2 # Abbreviation Code
40 .byte 46 # DW_TAG_subprogram
41 .byte 0 # DW_CHILDREN_no
42 .byte 17 # DW_AT_low_pc
43 .byte 1 # DW_FORM_addr
44 .byte 18 # DW_AT_high_pc
45 .byte 6 # DW_FORM_data4
46 .byte 64 # DW_AT_frame_base
47 .byte 24 # DW_FORM_exprloc
49 .byte 14 # DW_FORM_strp
50 .byte 58 # DW_AT_decl_file
51 .byte 11 # DW_FORM_data1
52 .byte 59 # DW_AT_decl_line
53 .byte 11 # DW_FORM_data1
54 .byte 63 # DW_AT_external
55 .byte 25 # DW_FORM_flag_present
60 .section .debug_info,"",@progbits
61 .long 60 # Length of Unit
62 .short 4 # DWARF version number
63 .long .debug_abbrev # Offset Into Abbrev. Section
64 .byte 8 # Address Size (in bytes)
65 .byte 1 # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit
66 .long 0 # DW_AT_producer
67 .short 12 # DW_AT_language
69 .long 0 # DW_AT_stmt_list
70 .long 0 # DW_AT_comp_dir
71 .quad .Lfunc_begin0 # DW_AT_low_pc
72 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
73 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
74 .quad .Lfunc_begin0 # DW_AT_low_pc
75 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
76 .byte 1 # DW_AT_frame_base
79 .byte 1 # DW_AT_decl_file
80 .byte 1 # DW_AT_decl_line
81 .byte 0 # End Of Children Mark