blob: 24f20803a0088a80ebf9db35f9c76cc89d529d68 [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
George Rimaradaba7a2017-06-09 13:30:36 +000011.text
12.globl _start
13.type _start,@function
14_start:
Peter Collingbourne0a2678e2017-05-15 17:59:21 +000015.Lfunc_begin0:
Peter Collingbourne0a2678e2017-05-15 17:59:21 +000016.Lfunc_end0:
Peter Collingbourne0a2678e2017-05-15 17:59:21 +000017
George Rimaradaba7a2017-06-09 13:30:36 +000018.section .debug_abbrev,"",@progbits
19 .byte 1 # Abbreviation Code
20 .byte 17 # DW_TAG_compile_unit
21 .byte 1 # DW_CHILDREN_yes
22 .byte 37 # DW_AT_producer
23 .byte 14 # DW_FORM_strp
24 .byte 19 # DW_AT_language
25 .byte 5 # DW_FORM_data2
26 .byte 3 # DW_AT_name
27 .byte 14 # DW_FORM_strp
28 .byte 16 # DW_AT_stmt_list
29 .byte 23 # DW_FORM_sec_offset
30 .byte 27 # DW_AT_comp_dir
31 .byte 14 # DW_FORM_strp
32 .byte 17 # DW_AT_low_pc
33 .byte 1 # DW_FORM_addr
34 .byte 18 # DW_AT_high_pc
35 .byte 6 # DW_FORM_data4
36 .byte 0 # EOM(1)
37 .byte 0 # EOM(2)
38 .byte 2 # Abbreviation Code
39 .byte 46 # DW_TAG_subprogram
40 .byte 0 # DW_CHILDREN_no
41 .byte 17 # DW_AT_low_pc
42 .byte 1 # DW_FORM_addr
43 .byte 18 # DW_AT_high_pc
44 .byte 6 # DW_FORM_data4
45 .byte 64 # DW_AT_frame_base
46 .byte 24 # DW_FORM_exprloc
47 .byte 3 # DW_AT_name
48 .byte 14 # DW_FORM_strp
49 .byte 58 # DW_AT_decl_file
50 .byte 11 # DW_FORM_data1
51 .byte 59 # DW_AT_decl_line
52 .byte 11 # DW_FORM_data1
53 .byte 63 # DW_AT_external
54 .byte 25 # DW_FORM_flag_present
55 .byte 0 # EOM(1)
56 .byte 0 # EOM(2)
57 .byte 0 # EOM(3)
Peter Collingbourne0a2678e2017-05-15 17:59:21 +000058
George Rimaradaba7a2017-06-09 13:30:36 +000059.section .debug_info,"",@progbits
60 .long 60 # Length of Unit
61 .short 4 # DWARF version number
62 .long .debug_abbrev # Offset Into Abbrev. Section
63 .byte 8 # Address Size (in bytes)
64 .byte 1 # Abbrev [1] 0xb:0x35 DW_TAG_compile_unit
65 .long 0 # DW_AT_producer
66 .short 12 # DW_AT_language
67 .long 0 # DW_AT_name
68 .long 0 # DW_AT_stmt_list
69 .long 0 # DW_AT_comp_dir
70 .quad .Lfunc_begin0 # DW_AT_low_pc
71 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
72 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
73 .quad .Lfunc_begin0 # DW_AT_low_pc
74 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
75 .byte 1 # DW_AT_frame_base
76 .byte 87
77 .long 0 # DW_AT_name
78 .byte 1 # DW_AT_decl_file
79 .byte 1 # DW_AT_decl_line
80 .byte 0 # End Of Children Mark