xref: /llvm-project/lld/test/COFF/directives.s (revision e2e132c5d967bb762fa00267337ed47af0163e84)
1# REQUIRES: x86
2
3# RUN: llvm-mc -triple=x86_64-windows %s -filetype=obj -o %t.obj
4
5# RUN: lld-link -dll -out:%t.dll -entry:entry %t.obj -subsystem:console
6# RUN: llvm-objdump -p %t.dll | FileCheck %s
7
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
17
18  .global entry
19  .global exportfn1
20  .global exportfn2
21  .global exportfn3
22  .global exportfn4
23  .global exportfn5
24  .global exportfn6
25  .text
26entry:
27exportfn1:
28exportfn2:
29exportfn3:
30exportfn4:
31exportfn5:
32exportfn6:
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"
46