44 lines · plain
1# REQUIRES: x862 3# Make a DLL that exports exportfn1.4# RUN: yaml2obj %p/Inputs/export.yaml -o %t.obj5# RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /implib:%t.lib6 7# Make an obj that takes the address of that exported function.8# RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %s -o %t2.obj9# RUN: lld-link -entry:main -guard:cf %t2.obj %t.lib -nodefaultlib -out:%t.exe10# RUN: llvm-readobj --coff-load-config %t.exe | FileCheck %s11 12# Check that the gfids table contains *exactly* two entries, one for exportfn113# and one for main.14# CHECK: GuardFidTable [15# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}}16# CHECK-NEXT: 0x{{[0-9A-Fa-f]+0$}}17# CHECK-NEXT: ]18 19 20 .def @feat.00;21 .scl 3;22 .type 0;23 .endef24 .globl @feat.0025@feat.00 = 0x00126 27 .section .text,"rx"28 .def main; .scl 2; .type 32; .endef29 .global main30main:31 leaq exportfn1(%rip), %rax32 retq33 34 .section .rdata,"dr"35.globl _load_config_used36_load_config_used:37 .long 25638 .fill 124, 1, 039 .quad __guard_fids_table40 .quad __guard_fids_count41 .long __guard_flags42 .fill 128, 1, 043 44