1# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
2# RUN: ld.lld %t -o %tout
3# RUN: llvm-objdump --section-headers  %tout | FileCheck %s
4# REQUIRES: x86
5
6.global _start
7.text
8_start:
9
10.section .text.a,"ax"
11.byte 0
12.section .text.,"ax"
13.byte 0
14.section .rodata.a,"a"
15.byte 0
16.section .rodata,"a"
17.byte 0
18.section .data.a,"aw"
19.byte 0
20.section .data,"aw"
21.byte 0
22.section .bss.a,"",@nobits
23.byte 0
24.section .bss,"",@nobits
25.byte 0
26.section .foo.a,"aw"
27.byte 0
28.section .foo,"aw"
29.byte 0
30.section .data.rel.ro,"aw",%progbits
31.byte 0
32.section .data.rel.ro.a,"aw",%progbits
33.byte 0
34.section .data.rel.ro.local,"aw",%progbits
35.byte 0
36.section .data.rel.ro.local.a,"aw",%progbits
37.byte 0
38.section .tbss.foo,"aGwT",@nobits,foo,comdat
39.byte 0
40.section .gcc_except_table.foo,"aG",@progbits,foo,comdat
41.byte 0
42.section .tdata.foo,"aGwT",@progbits,foo,comdat
43.byte 0
44
45// CHECK:  1 .rodata  00000002
46// CHECK:  2 .gcc_except_table 00000001
47// CHECK:  3 .text         00000002
48// CHECK:  4 .tdata        00000001
49// CHECK:  5 .tbss         00000001
50// CHECK:  6 .data.rel.ro  00000004
51// CHECK:  7 .data         00000002
52// CHECK:  8 .foo.a        00000001
53// CHECK:  9 .foo          00000001
54// CHECK: 10 .bss          00000001
55// CHECK: 11 .bss          00000001
56// CHECK: 12 .comment      00000008
57// CHECK: 13 .symtab       00000060
58// CHECK: 14 .shstrtab     00000075
59// CHECK: 15 .strtab       0000001d
60