blob: 933afed33e2fcb72e10590372820773921718b38 [file] [log] [blame]
Peter Collingbourne0a2678e2017-05-15 17:59:21 +00001# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t %s
2# RUN: ld.lld --gdb-index --gc-sections -o %t2 %t
3# RUN: llvm-dwarfdump -debug-dump=gdb_index %t2 | FileCheck %s
4
5# CHECK: Address area offset = 0x28, has 0 entries:
6
7# Generated with: (clang r302976)
8# echo "void _start() { __builtin_unreachable(); }" | \
9# clang -Os -g -S -o gdb-index-empty.s -x c - -Xclang -fdebug-compilation-dir -Xclang .
10
11 .text
12 .file "-"
13 .globl _start
14 .type _start,@function
15_start: # @_start
16.Lfunc_begin0:
17 .cfi_startproc
18# BB#0: # %entry
19.Lfunc_end0:
20 .size _start, .Lfunc_end0-_start
21 .cfi_endproc
22
23 .file 1 "<stdin>"
24 .section .debug_str,"MS",@progbits,1
25.Linfo_string0:
26 .asciz "clang version 5.0.0 " # string offset=0
27.Linfo_string1:
28 .asciz "-" # string offset=21
29.Linfo_string2:
30 .asciz "." # string offset=23
31.Linfo_string3:
32 .asciz "_start" # string offset=25
33 .section .debug_loc,"",@progbits
34 .section .debug_abbrev,"",@progbits
35 .byte 1 # Abbreviation Code
36 .byte 17 # DW_TAG_compile_unit
37 .byte 1 # DW_CHILDREN_yes
38 .byte 37 # DW_AT_producer
39 .byte 14 # DW_FORM_strp
40 .byte 19 # DW_AT_language
41 .byte 5 # DW_FORM_data2
42 .byte 3 # DW_AT_name
43 .byte 14 # DW_FORM_strp
44 .byte 16 # DW_AT_stmt_list
45 .byte 23 # DW_FORM_sec_offset
46 .byte 27 # DW_AT_comp_dir
47 .byte 14 # DW_FORM_strp
48 .byte 17 # DW_AT_low_pc
49 .byte 1 # DW_FORM_addr
50 .byte 18 # DW_AT_high_pc
51 .byte 6 # DW_FORM_data4
52 .byte 0 # EOM(1)
53 .byte 0 # EOM(2)
54 .byte 2 # Abbreviation Code
55 .byte 46 # DW_TAG_subprogram
56 .byte 0 # DW_CHILDREN_no
57 .byte 17 # DW_AT_low_pc
58 .byte 1 # DW_FORM_addr
59 .byte 18 # DW_AT_high_pc
60 .byte 6 # DW_FORM_data4
61 .byte 64 # DW_AT_frame_base
62 .byte 24 # DW_FORM_exprloc
63 .byte 3 # DW_AT_name
64 .byte 14 # DW_FORM_strp
65 .byte 58 # DW_AT_decl_file
66 .byte 11 # DW_FORM_data1
67 .byte 59 # DW_AT_decl_line
68 .byte 11 # DW_FORM_data1
69 .byte 63 # DW_AT_external
70 .byte 25 # DW_FORM_flag_present
71 .byte 0 # EOM(1)
72 .byte 0 # EOM(2)
73 .byte 0 # EOM(3)
74 .section .debug_info,"",@progbits
75.Lcu_begin0:
76 .long 60 # Length of Unit
77 .short 4 # DWARF version number
78 .long .debug_abbrev # Offset Into Abbrev. Section
79 .byte 8 # Address Size (in bytes)
80 .byte 1 # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit
81 .long .Linfo_string0 # DW_AT_producer
82 .short 12 # DW_AT_language
83 .long .Linfo_string1 # DW_AT_name
84 .long .Lline_table_start0 # DW_AT_stmt_list
85 .long .Linfo_string2 # DW_AT_comp_dir
86 .quad .Lfunc_begin0 # DW_AT_low_pc
87 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
88 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
89 .quad .Lfunc_begin0 # DW_AT_low_pc
90 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
91 .byte 1 # DW_AT_frame_base
92 .byte 87
93 .long .Linfo_string3 # DW_AT_name
94 .byte 1 # DW_AT_decl_file
95 .byte 1 # DW_AT_decl_line
96 # DW_AT_external
97 .byte 0 # End Of Children Mark
98 .section .debug_ranges,"",@progbits
99 .section .debug_macinfo,"",@progbits
100.Lcu_macro_begin0:
101 .byte 0 # End Of Macro List Mark
102 .section .debug_pubnames,"",@progbits
103 .long .LpubNames_end0-.LpubNames_begin0 # Length of Public Names Info
104.LpubNames_begin0:
105 .short 2 # DWARF Version
106 .long .Lcu_begin0 # Offset of Compilation Unit Info
107 .long 64 # Compilation Unit Length
108 .long 42 # DIE offset
109 .asciz "_start" # External Name
110 .long 0 # End Mark
111.LpubNames_end0:
112
113 .ident "clang version 5.0.0 "
114 .section ".note.GNU-stack","",@progbits
115 .section .debug_line,"",@progbits
116.Lline_table_start0: