1# REQUIRES: x86 2 3# RUN: echo -e "EXPORTS\n foo.bar" > %t.def 4 5# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=0 %s -o %t.obj 6# RUN: lld-link -entry:dllmain -dll -def:%t.def %t.obj -out:%t.1.dll 7# RUN: llvm-readobj --coff-exports %t.1.dll | FileCheck %s 8 9# RUN: lld-link -entry:dllmain -dll %t.obj -out:%t.2.dll -export:foo.bar 10# RUN: llvm-readobj --coff-exports %t.2.dll | FileCheck %s 11 12# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc -defsym drectve=1 %s -o %t.drectve.obj 13# RUN: lld-link -entry:dllmain -dll %t.drectve.obj -out:%t.3.dll 14# RUN: llvm-readobj --coff-exports %t.3.dll | FileCheck %s 15 16# CHECK: Name: foo.bar 17 18 .text 19 .globl dllmain 20 .globl foo.bar 21dllmain: 22 ret 23foo.bar: 24 ret 25 26.if drectve==1 27 .section .drectve 28 .ascii "-export:foo.bar" 29.endif 30