Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / section-name.s
blob819cd9c14d95001d5826fe90e4382b0d7495b5f1
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: ld.lld %t -o %tout
4 # RUN: llvm-objdump --section-headers %tout | FileCheck %s
6 .global _start
7 .text
8 _start:
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,"aw",@nobits
23 .byte 0
24 .section .bss,"aw",@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
45 // CHECK: .rodata 00000002
46 // CHECK-NEXT: .gcc_except_table 00000001
47 // CHECK-NEXT: .text 00000002
48 // CHECK-NEXT: .tdata 00000001
49 // CHECK-NEXT: .tbss 00000001
50 // CHECK-NEXT: .data.rel.ro 00000004
51 // CHECK-NEXT: .relro_padding 00000df5
52 // CHECK-NEXT: .data 00000002
53 // CHECK-NEXT: .foo.a 00000001
54 // CHECK-NEXT: .foo 00000001
55 // CHECK-NEXT: .bss 00000002
56 // CHECK-NEXT: .comment 00000008
57 // CHECK-NEXT: .symtab 00000030
58 // CHECK-NEXT: .shstrtab 00000084
59 // CHECK-NEXT: .strtab 00000008