3 # RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj
5 # RUN: lld-link %t.obj -out:%t.exe -debug:symtab -subsystem:console
6 # RUN: llvm-readobj --coff-exports %t.exe | FileCheck %s
8 # CHECK: Name: exportedFunc
10 ## This assembly snippet has been reduced from what Clang generates from
11 ## this C snippet, with -fsanitize=address. Normally, the .drectve
12 ## section would be a regular section - but when compiled with
13 ## -fsanitize=address, it becomes a comdat section.
15 # void exportedFunc(void) {}
16 # void mainCRTStartup(void) {}
17 # static __attribute__((section(".drectve"), used)) const char export_chkstk[] =
18 # "-export:exportedFunc";
29 .section .drectve,"dr",one_only,export_chkstk
31 .asciz "-export:exportedFunc"