3 # RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/shared-abbrev.o
4 # RUN: %clang %cflags %t/shared-abbrev.o -o %t/shared-abbrev.exe
5 # RUN: llvm-bolt %t/shared-abbrev.exe -o %t/shared-abbrev.exe.bolt --update-debug-sections
6 # RUN: llvm-dwarfdump --debug-info %t/shared-abbrev.exe.bolt | FileCheck %s
9 # CHECK-SAME: abbr_offset = 0x0000
11 # CHECK-NEXT: DW_TAG_compile_unit
12 # CHECK-NEXT: DW_AT_stmt_list
13 # CHECK-NEXT: DW_AT_low_pc
14 # CHECK-NEXT: DW_AT_ranges
16 # CHECK-SAME: abbr_offset = 0x0000
18 # CHECK: DW_TAG_compile_unit
19 # CHECK-NEXT: DW_AT_stmt_list
20 # CHECK-NEXT: DW_AT_low_pc
21 # CHECK-NEXT: DW_AT_ranges
23 # CHECK-SAME: abbr_offset = 0x0000
25 # CHECK-NEXT: DW_TAG_compile_unit
26 # CHECK-NEXT: DW_AT_stmt_list
27 # CHECK-NEXT: DW_AT_low_pc
28 # CHECK-NEXT: DW_AT_ranges
32 .globl main # -- Begin function main
37 .file 1 "test" "main.cpp"
38 .loc 1 1 0 # main.cpp:1:0
44 .size main, .Lfunc_end0-main
47 .section .debug_abbrev,"",@progbits
48 .byte 1 # Abbreviation Code
49 .byte 17 # DW_TAG_compile_unit
50 .byte 0 # DW_CHILDREN_no
51 .byte 16 # DW_AT_stmt_list
52 .byte 23 # DW_FORM_sec_offset
53 .byte 17 # DW_AT_low_pc
54 .byte 1 # DW_FORM_addr
55 .byte 18 # DW_AT_high_pc
56 .byte 7 # DW_FORM_data8
59 .byte 2 # Abbreviation Code
60 .byte 17 # DW_TAG_compile_unit
61 .byte 0 # DW_CHILDREN_no
62 .byte 16 # DW_AT_stmt_list
63 .byte 23 # DW_FORM_sec_offset
64 .byte 17 # DW_AT_low_pc
65 .byte 1 # DW_FORM_addr
66 .byte 85 # DW_AT_ranges
67 .byte 23 # DW_FORM_sec_offset
71 .section .debug_info,"",@progbits
73 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
75 .short 4 # DWARF version number
76 .long .debug_abbrev # Offset Into Abbrev. Section
77 .byte 8 # Address Size (in bytes)
78 .byte 2 # Abbrev [2] DW_TAG_compile_unit
79 .long .Lline_table_start0 # DW_AT_stmt_list
80 .quad 0 # DW_AT_low_pc
81 .long .Ldebug_ranges0 # DW_AT_ranges --- end manual --
85 .long .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
87 .short 4 # DWARF version number
88 .long .debug_abbrev # Offset Into Abbrev. Section
89 .byte 8 # Address Size (in bytes)
90 .byte 1 # Abbrev [1] DW_TAG_compile_unit
91 .long .Lline_table_start0 # DW_AT_stmt_list
92 .quad .Lfunc_begin0 # DW_AT_low_pc
93 .quad .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
94 .byte 0 # End Of Children Mark
98 .long .Ldebug_info_end2-.Ldebug_info_start2 # Length of Unit
100 .short 4 # DWARF version number
101 .long .debug_abbrev # Offset Into Abbrev. Section
102 .byte 8 # Address Size (in bytes)
103 .byte 2 # Abbrev [2] DW_TAG_compile_unit
104 .long .Lline_table_start0 # DW_AT_stmt_list
105 .quad 0 # DW_AT_low_pc
106 .long .Ldebug_ranges0 # DW_AT_ranges --- end manual --
108 .section .debug_ranges,"",@progbits
116 .section ".note.GNU-stack","",@progbits
118 .section .debug_line,"",@progbits