1# REQUIRES: x86 2 3# The __guard_fids_table is a DefinedSynthetic when control flow guard is 4# enabled and there are entries to be added to the fids table. This test uses 5# this to check that DefinedSynthetic symbols are being written to the COFF 6# symbol table. 7 8# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj 9# RUN: lld-link %t.obj -guard:cf -out:%t.exe -entry:main -debug:symtab 10# RUN: llvm-readobj --symbols %t.exe | FileCheck --check-prefix=CHECK %s 11 12# CHECK: Name: __guard_fids_table 13# CHECK-NEXT: Value: 14# CHECK-NEXT: Section: .rdata (2) 15 16 17# We need @feat.00 to have 0x800 to indicate /guard:cf. 18 .def @feat.00; 19 .scl 3; 20 .type 0; 21 .endef 22 .globl @feat.00 23@feat.00 = 0x800 24 .def main; .scl 2; .type 32; .endef 25 .globl main # -- Begin function main 26 .p2align 4, 0x90 27main: 28 retq 29 # -- End function 30 .section .gfids$y,"dr" 31 .symidx main 32 .section .giats$y,"dr" 33 .section .gljmp$y,"dr" 34 .addrsig_sym main 35 .section .rdata,"dr" 36 37.globl _load_config_used 38 .p2align 3 39_load_config_used: 40 .long 312 41 .fill 124, 1, 0 42 .quad __guard_fids_table 43 .quad __guard_fids_count 44 .long __guard_flags 45 .fill 12, 1, 0 46 .quad __guard_iat_table 47 .quad __guard_iat_count 48 .quad __guard_longjmp_table 49 .quad __guard_longjmp_count 50 .fill 72, 1, 0 51 .quad __guard_eh_cont_table 52 .quad __guard_eh_cont_count 53 .fill 32, 1, 0 54