Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / directives.s
blobcc12e391b0f9d7e526c3601626f262e6491fddf0
1 # REQUIRES: x86
3 # RUN: llvm-mc -triple=x86_64-windows %s -filetype=obj -o %t.obj
5 # RUN: lld-link -dll -out:%t.dll -entry:entry %t.obj -subsystem:console
6 # RUN: llvm-objdump -p %t.dll | FileCheck %s
8 # CHECK: Export Table:
9 # CHECK: DLL name: directives.s.tmp.dll
10 # CHECK: Ordinal RVA Name
11 # CHECK-NEXT: 1 0x1000 exportfn1
12 # CHECK-NEXT: 2 0x1000 exportfn2
13 # CHECK-NEXT: 3 0x1000 exportfn3
14 # CHECK-NEXT: 4 0x1000 exportfn4
15 # CHECK-NEXT: 5 0x1000 exportfn5
16 # CHECK-NEXT: 6 0x1000 exportfn6
18 .global entry
19 .global exportfn1
20 .global exportfn2
21 .global exportfn3
22 .global exportfn4
23 .global exportfn5
24 .global exportfn6
25 .text
26 entry:
27 exportfn1:
28 exportfn2:
29 exportfn3:
30 exportfn4:
31 exportfn5:
32 exportfn6:
33 ret
34 .section .drectve
35 # Test that directive strings can be separated by any combination of
36 # spaces and null bytes.
37 .ascii "-export:exportfn1 "
38 .asciz "-export:exportfn2"
39 .asciz "-export:exportfn3"
40 .asciz "-export:exportfn4 "
41 .byte 0
42 .ascii " "
43 .byte 0
44 .asciz "-export:exportfn5"
45 .asciz " -export:exportfn6"