32 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -triple=x86_64-windows-gnu %s -filetype=obj -o %t.obj4 5# RUN: lld-link %t.obj -out:%t.exe -debug:symtab -subsystem:console6# RUN: llvm-readobj --coff-exports %t.exe | FileCheck %s7 8# CHECK: Name: exportedFunc9 10## This assembly snippet has been reduced from what Clang generates from11## this C snippet, with -fsanitize=address. Normally, the .drectve12## section would be a regular section - but when compiled with13## -fsanitize=address, it becomes a comdat section.14##15# void exportedFunc(void) {}16# void mainCRTStartup(void) {}17# static __attribute__((section(".drectve"), used)) const char export_chkstk[] =18# "-export:exportedFunc";19 20 .text21 .globl exportedFunc22exportedFunc:23 retq24 25 .globl mainCRTStartup26mainCRTStartup:27 retq28 29 .section .drectve,"dr",one_only,export_chkstk30export_chkstk:31 .asciz "-export:exportedFunc"32