1 # RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o - \
2 # RUN: | llvm-dwarfdump -verify - | FileCheck %s
4 # Assembly generated from the following compiled with -g -ffunction-sections
13 .section .text.f1,"ax",@progbits
14 .globl f1 # -- Begin function f1
19 .file 1 "/usr/local/google/home/blaikie/dev/scratch" "test.c"
20 .loc 1 1 0 # test.c:1:0
24 .cfi_def_cfa_offset 16
27 .cfi_def_cfa_register %rbp
29 .loc 1 1 13 prologue_end # test.c:1:13
35 .size f1, .Lfunc_end0-f1
38 .section .text.f2,"ax",@progbits
39 .globl f2 # -- Begin function f2
44 .loc 1 2 0 # test.c:2:0
48 .cfi_def_cfa_offset 16
51 .cfi_def_cfa_register %rbp
53 .loc 1 2 13 prologue_end # test.c:2:13
59 .size f2, .Lfunc_end1-f2
62 .section .debug_abbrev,"",@progbits
63 .byte 1 # Abbreviation Code
64 .byte 17 # DW_TAG_compile_unit
65 .byte 1 # DW_CHILDREN_yes
66 .byte 37 # DW_AT_producer
67 .byte 14 # DW_FORM_strp
68 .byte 19 # DW_AT_language
69 .byte 5 # DW_FORM_data2
71 .byte 14 # DW_FORM_strp
72 .byte 16 # DW_AT_stmt_list
73 .byte 23 # DW_FORM_sec_offset
74 .byte 27 # DW_AT_comp_dir
75 .byte 14 # DW_FORM_strp
76 .byte 17 # DW_AT_low_pc
77 .byte 1 # DW_FORM_addr
78 .byte 85 # DW_AT_ranges
79 .byte 23 # DW_FORM_sec_offset
82 .byte 2 # Abbreviation Code
83 .byte 46 # DW_TAG_subprogram
84 .byte 0 # DW_CHILDREN_no
85 .byte 17 # DW_AT_low_pc
86 .byte 1 # DW_FORM_addr
87 .byte 18 # DW_AT_high_pc
88 .byte 6 # DW_FORM_data4
89 .byte 64 # DW_AT_frame_base
90 .byte 24 # DW_FORM_exprloc
92 .byte 14 # DW_FORM_strp
93 .byte 58 # DW_AT_decl_file
94 .byte 11 # DW_FORM_data1
95 .byte 59 # DW_AT_decl_line
96 .byte 11 # DW_FORM_data1
97 .byte 63 # DW_AT_external
98 .byte 25 # DW_FORM_flag_present
102 .section .debug_info,"",@progbits
104 .long .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
106 .short 4 # DWARF version number
107 .long .debug_abbrev # Offset Into Abbrev. Section
108 .byte 8 # Address Size (in bytes)
109 .byte 1 # Abbrev [1] 0xb:0x4a DW_TAG_compile_unit
110 .long .Linfo_string0 # DW_AT_producer
111 .short 12 # DW_AT_language
112 .long .Linfo_string1 # DW_AT_name
113 .long .Lline_table_start0 # DW_AT_stmt_list
114 .long .Linfo_string2 # DW_AT_comp_dir
115 .quad 0 # DW_AT_low_pc
116 .long .Ldebug_ranges0 # DW_AT_ranges
117 .byte 2 # Abbrev [2] 0x2a:0x15 DW_TAG_subprogram
118 .quad .Lfunc_begin0 # DW_AT_low_pc
119 .long .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
120 .byte 1 # DW_AT_frame_base
122 .long .Linfo_string3 # DW_AT_name
123 .byte 1 # DW_AT_decl_file
124 .byte 1 # DW_AT_decl_line
126 .byte 2 # Abbrev [2] 0x3f:0x15 DW_TAG_subprogram
127 .quad .Lfunc_begin1 # DW_AT_low_pc
128 .long .Lfunc_end1-.Lfunc_begin1 # DW_AT_high_pc
129 .byte 1 # DW_AT_frame_base
131 .long .Linfo_string4 # DW_AT_name
132 .byte 1 # DW_AT_decl_file
133 .byte 2 # DW_AT_decl_line
135 .byte 0 # End Of Children Mark
137 .section .debug_ranges,"",@progbits
145 .section .debug_str,"MS",@progbits,1
147 .asciz "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 0bed7905ad3c677cb2b95c3a7a6f929d4d679510)" # string offset=0
149 .asciz "test.c" # string offset=101
151 .asciz "/usr/local/google/home/blaikie/dev/scratch" # string offset=108
153 .asciz "f1" # string offset=151
155 .asciz "f2" # string offset=154
156 .ident "clang version 14.0.0 (git@github.com:llvm/llvm-project.git 0bed7905ad3c677cb2b95c3a7a6f929d4d679510)"
157 .section ".note.GNU-stack","",@progbits
159 .section .debug_line,"",@progbits